diff options
author | aclement <aclement> | 2004-07-27 10:27:03 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-07-27 10:27:03 +0000 |
commit | 9867cbbcc40e471fb07ea7726fa02664f36ac8e8 (patch) | |
tree | c70aa812a1d5078796f4422307ebf8ac4d26cd06 /ajde | |
parent | ee59f0ec0cd86841b4d1f8d8f6487e24cb026b80 (diff) | |
download | aspectj-9867cbbcc40e471fb07ea7726fa02664f36ac8e8.tar.gz aspectj-9867cbbcc40e471fb07ea7726fa02664f36ac8e8.zip |
Test data for -showWeaveInfo
Diffstat (limited to 'ajde')
37 files changed, 215 insertions, 0 deletions
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.aj b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.aj new file mode 100644 index 000000000..7ced0baf7 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.aj @@ -0,0 +1,32 @@ +// Simple aspect that tramples all over Simple.java
+
+public aspect AspectAdvice {
+
+ // Go through all the kinds of things that might affect a type:
+ pointcut methodRunning(): execution(* *(..)) && !execution(* main(..));
+
+ before(): methodRunning() {
+ System.err.println("BEFORE ADVICE");
+ }
+
+ after(): methodRunning() {
+ System.err.println("AFTER ADVICE");
+ }
+
+ after() returning: methodRunning() {
+ System.err.println("AFTER RETURNING ADVICE");
+ }
+
+ after() throwing : methodRunning() {
+ System.err.println("AFTER THROWING ADVICE");
+ }
+
+ void around(): execution(* main(..)) && !cflow(adviceexecution()){
+ System.err.println("AROUND ADVICE");
+ proceed();
+ }
+
+
+ interface markerInterface {
+ }
+}
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar Binary files differnew file mode 100644 index 000000000..f0c206cc8 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar Binary files differnew file mode 100644 index 000000000..c6bea10fe --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectAdvice_nodebug.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.aj b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.aj new file mode 100644 index 000000000..e62661231 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.aj @@ -0,0 +1,24 @@ +// Simple aspect that tramples all over Simple.java
+
+public aspect AspectDeclare {
+
+ pointcut methodRunning(): execution(* *(..));
+
+ declare parents: Simple implements MarkerInterface;
+
+// declare parents: Simple extends InTheWay;
+
+// declare soft:
+//
+// declare precedence:
+//
+// declare warning:
+//
+// declare error:
+//
+}
+
+
+interface MarkerInterface {}
+
+class InTheWay {}
\ No newline at end of file diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar Binary files differnew file mode 100644 index 000000000..3ac58f1ae --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareExtends.aj b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareExtends.aj new file mode 100644 index 000000000..f250515a1 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareExtends.aj @@ -0,0 +1,22 @@ +// Simple aspect that tramples all over Simple.java
+
+public aspect AspectDeclareExtends {
+
+ pointcut methodRunning(): execution(* *(..));
+
+ declare parents: Simple extends InTheWay;
+
+// declare soft:
+//
+// declare precedence:
+//
+// declare warning:
+//
+// declare error:
+//
+}
+
+
+interface MarkerInterface {}
+
+class InTheWay {}
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.aj b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.aj new file mode 100644 index 000000000..f7255675f --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.aj @@ -0,0 +1,9 @@ +
+public aspect AspectDeclareSoft {
+
+ declare soft: MyException: execution(* main(..));
+
+ declare soft: Exception+: execution(* main(..));
+
+}
+class MyException extends Exception {}
diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar Binary files differnew file mode 100644 index 000000000..76becf16f --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar Binary files differnew file mode 100644 index 000000000..942e2af44 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclareSoft_nodebug.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar Binary files differnew file mode 100644 index 000000000..15007f2c3 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectDeclare_nodebug.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD.aj b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.aj new file mode 100644 index 000000000..1f47b33e0 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.aj @@ -0,0 +1,17 @@ +// Simple aspect that tramples all over Simple.java
+
+public aspect AspectITD {
+
+ int Simple.fieldint = 5;
+
+ String Simple.fieldstring = "hello";
+
+ public int Simple.returnint() {
+ return 5;
+ }
+
+ public String Simple.returnstring() {
+ return "abc";
+ }
+
+}
\ No newline at end of file diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD.class b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.class Binary files differnew file mode 100644 index 000000000..8048ad9f7 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.class diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar Binary files differnew file mode 100644 index 000000000..b80af1dfe --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar Binary files differnew file mode 100644 index 000000000..b80af1dfe --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/AspectITD_nodebug.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/Empty.ajsym b/ajde/testdata/WeaveInfoMessagesTest/Empty.ajsym Binary files differnew file mode 100644 index 000000000..53cf1bfd9 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Empty.ajsym diff --git a/ajde/testdata/WeaveInfoMessagesTest/Empty.lst b/ajde/testdata/WeaveInfoMessagesTest/Empty.lst new file mode 100644 index 000000000..2e3d99c2b --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Empty.lst @@ -0,0 +1 @@ +-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/Five.lst b/ajde/testdata/WeaveInfoMessagesTest/Five.lst new file mode 100644 index 000000000..34b752fd2 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Five.lst @@ -0,0 +1,3 @@ +Simple.java
+-showWeaveInfo
+AspectDeclareSoft.aj
diff --git a/ajde/testdata/WeaveInfoMessagesTest/Four.lst b/ajde/testdata/WeaveInfoMessagesTest/Four.lst new file mode 100644 index 000000000..3f30efbcd --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Four.lst @@ -0,0 +1,3 @@ +AspectDeclareExtends.aj
+Simple.java
+-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/One.lst b/ajde/testdata/WeaveInfoMessagesTest/One.lst new file mode 100644 index 000000000..e85b4af93 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/One.lst @@ -0,0 +1,3 @@ +AspectAdvice.aj
+Simple.java
+-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/Simple.class b/ajde/testdata/WeaveInfoMessagesTest/Simple.class Binary files differnew file mode 100644 index 000000000..d6dca7fc3 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Simple.class diff --git a/ajde/testdata/WeaveInfoMessagesTest/Simple.jar b/ajde/testdata/WeaveInfoMessagesTest/Simple.jar Binary files differnew file mode 100644 index 000000000..e09f48fda --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Simple.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/Simple.java b/ajde/testdata/WeaveInfoMessagesTest/Simple.java new file mode 100644 index 000000000..934087546 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Simple.java @@ -0,0 +1,21 @@ +// A simple class, interfered with by all sorts of advice ! + +public class Simple { + + public void m1() { + + } + + public String m2() { + return "a"; + } + + public static void main(String[] argv) { + + } + + private void mSecret() { + + } + +}
\ No newline at end of file diff --git a/ajde/testdata/WeaveInfoMessagesTest/Simple_nodebug.jar b/ajde/testdata/WeaveInfoMessagesTest/Simple_nodebug.jar Binary files differnew file mode 100644 index 000000000..b8e45da32 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Simple_nodebug.jar diff --git a/ajde/testdata/WeaveInfoMessagesTest/Three.lst b/ajde/testdata/WeaveInfoMessagesTest/Three.lst new file mode 100644 index 000000000..141c6c9d7 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Three.lst @@ -0,0 +1,3 @@ +AspectDeclare.aj
+Simple.java
+-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/Two.lst b/ajde/testdata/WeaveInfoMessagesTest/Two.lst new file mode 100644 index 000000000..cb891a8a5 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/Two.lst @@ -0,0 +1,3 @@ +AspectITD.aj
+Simple.java
+-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/a.lst b/ajde/testdata/WeaveInfoMessagesTest/a.lst new file mode 100644 index 000000000..5df12713c --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/a.lst @@ -0,0 +1,2 @@ +Simple.jar
+-showWeaveInfo
diff --git a/ajde/testdata/WeaveInfoMessagesTest/build.xml b/ajde/testdata/WeaveInfoMessagesTest/build.xml new file mode 100644 index 000000000..774291d74 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/build.xml @@ -0,0 +1,18 @@ +<project name="aspectj-examples" default="spacewar" basedir="."> + + <!--target name="init.taskdefs"--> + <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> + <classpath> + <pathelement path="c:\aspectj1.2\lib\aspectjtools.jar"/> + </classpath> + </taskdef> + <!--/target--> + + <target name="spacewar"> + <iajc destdir="." argfiles="Two.lst" debug="off" + fork="true" forkclasspath="c:\aspectj1.2\lib\aspectjtools.jar" + classpath="c:\aspectj1.2\lib\aspectjrt.jar"/> + + </target> + +</project> diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt new file mode 100644 index 000000000..bd3f0b01b --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.nodebug.txt @@ -0,0 +1,13 @@ +Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (no debug info available) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) +Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt new file mode 100644 index 000000000..05272b938 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.binary.txt @@ -0,0 +1,13 @@ +Type 'Simple' (Simple.java:7) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:7) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:7) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:7) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (Simple.java:10) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:10) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:10) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:10) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (Simple.java:15) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) +Type 'Simple' (Simple.java:19) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:19) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:19) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:19) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt new file mode 100644 index 000000000..05272b938 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/advice.txt @@ -0,0 +1,13 @@ +Type 'Simple' (Simple.java:7) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:7) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:7) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:7) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (Simple.java:10) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:10) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:10) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:10) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) +Type 'Simple' (Simple.java:15) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) +Type 'Simple' (Simple.java:19) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8) +Type 'Simple' (Simple.java:19) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12) +Type 'Simple' (Simple.java:19) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16) +Type 'Simple' (Simple.java:19) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare.extends.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.extends.txt new file mode 100644 index 000000000..29fb45592 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.extends.txt @@ -0,0 +1 @@ +Setting superclass of type 'Simple' (Simple.java) to 'InTheWay' (AspectDeclareExtends.aj) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt new file mode 100644 index 000000000..02e006e29 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.nodebug.txt @@ -0,0 +1,2 @@ +Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6) +Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:4) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.txt new file mode 100644 index 000000000..a48ea6101 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare.soft.txt @@ -0,0 +1,2 @@ +Softening exceptions in type 'Simple' (Simple.java:15) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6) +Softening exceptions in type 'Simple' (Simple.java:15) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:4) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.nodebug.txt new file mode 100644 index 000000000..1da4b502c --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.nodebug.txt @@ -0,0 +1 @@ +Extending interface set for type 'Simple' (no debug info available) to include 'MarkerInterface' (AspectDeclare.aj) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.txt new file mode 100644 index 000000000..b05cdfb86 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/declare1.txt @@ -0,0 +1 @@ +Extending interface set for type 'Simple' (Simple.java) to include 'MarkerInterface' (AspectDeclare.aj) diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt new file mode 100644 index 000000000..49bf89d69 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.nodebug.txt @@ -0,0 +1,4 @@ +Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') +Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') +Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') +Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint') diff --git a/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt new file mode 100644 index 000000000..eaaa311e1 --- /dev/null +++ b/ajde/testdata/WeaveInfoMessagesTest/expected/itd.txt @@ -0,0 +1,4 @@ +Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()') +Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()') +Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring') +Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint') |