+++ /dev/null
-// Simple aspect that tramples all over Simple.java\r
-\r
-public aspect AspectAdvice {\r
-\r
- // Go through all the kinds of things that might affect a type:\r
- pointcut methodRunning(): execution(* *(..)) && !execution(* main(..));\r
- \r
- before(): methodRunning() {\r
- System.err.println("BEFORE ADVICE");\r
- }\r
- \r
- after(): methodRunning() {\r
- System.err.println("AFTER ADVICE");\r
- }\r
-\r
- after() returning: methodRunning() {\r
- System.err.println("AFTER RETURNING ADVICE");\r
- }\r
-\r
- after() throwing : methodRunning() {\r
- System.err.println("AFTER THROWING ADVICE");\r
- }\r
- \r
- void around(): execution(* main(..)) && !cflow(adviceexecution()){\r
- System.err.println("AROUND ADVICE");\r
- proceed();\r
- }\r
- \r
- \r
- interface markerInterface { \r
- } \r
-}\r
+++ /dev/null
-// Simple aspect that tramples all over Simple.java\r
-\r
-public aspect AspectDeclare {\r
- \r
- pointcut methodRunning(): execution(* *(..));\r
- \r
- declare parents: Simple implements MarkerInterface;\r
- \r
-// declare parents: Simple extends InTheWay;\r
- \r
-// declare soft: \r
-// \r
-// declare precedence:\r
-// \r
-// declare warning:\r
-// \r
-// declare error:\r
-// \r
-}\r
-\r
- \r
-interface MarkerInterface {}\r
-\r
-class InTheWay {}
\ No newline at end of file
+++ /dev/null
-// little aspect and class for testing declaration of annotations
-
-@interface anInterface {}
-
-public aspect AspectDeclareAnnotations{
-
- declare @type : Test : @anInterface;
- declare @constructor : Test.new(String,int) : @anInterface;
- declare @method : int Test.fac(int) : @anInterface;
- declare @field : int Test.a : @anInterface;
-
-}
-
-class Test{
-
- public Test(String say, int something){
- System.out.println(say + something);
- }
-
- public int fac(int n){
- return (n == 0)? 1 : n * fac(n-1);
- }
-
- public int a = 1;
-}
+++ /dev/null
-// Simple aspect that tramples all over Simple.java\r
-\r
-public aspect AspectDeclareExtends {\r
- \r
- pointcut methodRunning(): execution(* *(..));\r
- \r
- declare parents: Simple extends InTheWay;\r
- \r
-// declare soft: \r
-// \r
-// declare precedence:\r
-// \r
-// declare warning:\r
-// \r
-// declare error:\r
-// \r
-}\r
-\r
- \r
-interface MarkerInterface {}\r
-\r
-class InTheWay {}\r
+++ /dev/null
-\r
-public aspect AspectDeclareSoft {\r
- \r
- declare soft: MyException: execution(* main(..));\r
-\r
- declare soft: Exception+: execution(* main(..));\r
-\r
-}\r
-class MyException extends Exception {}\r
+++ /dev/null
-// Simple aspect that tramples all over Simple.java\r
-\r
-public aspect AspectITD {\r
- \r
- int Simple.fieldint = 5;\r
- \r
- String Simple.fieldstring = "hello";\r
- \r
- public int Simple.returnint() {\r
- return 5;\r
- }\r
- \r
- public String Simple.returnstring() {\r
- return "abc";\r
- }\r
- \r
-}
\ No newline at end of file
+++ /dev/null
-package pkg;
-
-public aspect AspectInPackage {
-
- pointcut p() : execution(* *.*(..));
-
- before() : p() {
- }
-
-}
+++ /dev/null
--showWeaveInfo\r
+++ /dev/null
-Simple.java\r
--showWeaveInfo\r
-AspectDeclareSoft.aj\r
+++ /dev/null
-AspectDeclareExtends.aj\r
-Simple.java\r
--showWeaveInfo\r
+++ /dev/null
-AspectAdvice.aj\r
-Simple.java\r
--showWeaveInfo\r
+++ /dev/null
--1.5
-AspectDeclareAnnotations.aj
+++ /dev/null
-// 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
+++ /dev/null
--showWeaveInfo
--1.5
-AspectDeclareAnnotations.aj
+++ /dev/null
-AspectDeclare.aj\r
-Simple.java\r
--showWeaveInfo\r
+++ /dev/null
-AspectITD.aj\r
-Simple.java\r
--showWeaveInfo\r
+++ /dev/null
-Simple.jar\r
--showWeaveInfo\r
+++ /dev/null
-<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>
+++ /dev/null
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:20(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:20(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (no debug info available) advised by around advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:24(from AspectAdvice.aj)) [with runtime test]
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by before advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by after advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (no debug info available) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice_nodebug.jar!AspectAdvice.class:20(from AspectAdvice.aj))
+++ /dev/null
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.jar!AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.jar!AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.jar!AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.jar!AspectInPackage.class:7(from AspectInPackage.aj))
+++ /dev/null
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.class:7(from AspectInPackage.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'pkg.AspectInPackage' (AspectInPackage.class:7(from AspectInPackage.aj))
+++ /dev/null
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:20(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:20(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:24(from AspectAdvice.aj)) [with runtime test]
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:8(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:12(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:16(from AspectAdvice.aj))
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.jar!AspectAdvice.class:20(from AspectAdvice.aj))
+++ /dev/null
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8)
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12)
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16)
-Join point 'method-execution(void Simple.m1())' in Type 'Simple' (Simple.java:5) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20)
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8)
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12)
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16)
-Join point 'method-execution(java.lang.String Simple.m2())' in Type 'Simple' (Simple.java:9) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20)
-Join point 'method-execution(void Simple.main(java.lang.String[]))' in Type 'Simple' (Simple.java:13) advised by around advice from 'AspectAdvice' (AspectAdvice.aj:24) [with runtime test]
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by before advice from 'AspectAdvice' (AspectAdvice.aj:8)
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by after advice from 'AspectAdvice' (AspectAdvice.aj:12)
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterReturning advice from 'AspectAdvice' (AspectAdvice.aj:16)
-Join point 'method-execution(void Simple.mSecret())' in Type 'Simple' (Simple.java:17) advised by afterThrowing advice from 'AspectAdvice' (AspectAdvice.aj:20)
+++ /dev/null
-'Test' (AspectDeclareAnnotations.aj:14) is annotated with @anInterface type annotation from 'AspectDeclareAnnotations' (AspectDeclareAnnotations.aj:7)
-'public void Test.new(String,int)' (AspectDeclareAnnotations.aj:16) is annotated with @anInterface constructor annotation from 'AspectDeclareAnnotations' (AspectDeclareAnnotations.aj:8)
-'public int Test.fac(int)' (AspectDeclareAnnotations.aj:20) is annotated with @anInterface method annotation from 'AspectDeclareAnnotations' (AspectDeclareAnnotations.aj:9)
-'public int a' of type 'Test' (AspectDeclareAnnotations.aj) is annotated with @anInterface field annotation from 'AspectDeclareAnnotations' (AspectDeclareAnnotations.aj:10)
+++ /dev/null
-Setting superclass of type 'Simple' (Simple.java) to 'InTheWay' (AspectDeclareExtends.aj)
+++ /dev/null
-Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft_nodebug.jar!AspectDeclareSoft.class:4(from AspectDeclareSoft.aj))
-Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft_nodebug.jar!AspectDeclareSoft.class:6(from AspectDeclareSoft.aj))
+++ /dev/null
-Softening exceptions in type 'Simple' (Simple.java:13) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.jar!AspectDeclareSoft.class:4(from AspectDeclareSoft.aj))
-Softening exceptions in type 'Simple' (Simple.java:13) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.jar!AspectDeclareSoft.class:6(from AspectDeclareSoft.aj))
+++ /dev/null
-Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:4)
-Softening exceptions in type 'Simple' (no debug info available) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6)
+++ /dev/null
-Softening exceptions in type 'Simple' (Simple.java:13) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:6)
-Softening exceptions in type 'Simple' (Simple.java:13) as defined by aspect 'AspectDeclareSoft' (AspectDeclareSoft.aj:4)
+++ /dev/null
-Extending interface set for type 'Simple' (no debug info available) to include 'MarkerInterface' (AspectDeclare.aj)
+++ /dev/null
-Extending interface set for type 'Simple' (Simple.java) to include 'MarkerInterface' (AspectDeclare.aj)
+++ /dev/null
-Type 'Simple' (no debug info available) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint')
-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 method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()')
-Type 'Simple' (no debug info available) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()')
+++ /dev/null
-Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'int Simple.fieldint')
-Type 'Simple' (Simple.java) has intertyped field from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.fieldstring')
-Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'int Simple.returnint()')
-Type 'Simple' (Simple.java) has intertyped method from 'AspectITD' (AspectITD.aj:'java.lang.String Simple.returnstring()')