diff options
author | wisberg <wisberg> | 2003-05-27 09:30:21 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2003-05-27 09:30:21 +0000 |
commit | e289da390eb3c1dbc3789d53d0ee19fd5771d4a2 (patch) | |
tree | 77de85c95cf7fcfbaa4c741ebcf4be264b85bda9 | |
parent | 44424b14e61b24ea0b89934d2b0107d1406d8232 (diff) | |
download | aspectj-e289da390eb3c1dbc3789d53d0ee19fd5771d4a2.tar.gz aspectj-e289da390eb3c1dbc3789d53d0ee19fd5771d4a2.zip |
tests for devguide script example
4 files changed, 41 insertions, 0 deletions
diff --git a/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java b/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java new file mode 100644 index 000000000..c0073c3ff --- /dev/null +++ b/docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java @@ -0,0 +1,11 @@ + +package org.smart.persist; + +aspect Persist { + + after(String string) returning : set(public String *) + && !target(Persist) && args(string) { + String name = thisJoinPoint.getSignature().getName(); + System.out.println("set " + name + " to " + string); + } +}
\ No newline at end of file diff --git a/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java b/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java new file mode 100644 index 000000000..19e4a0030 --- /dev/null +++ b/docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java @@ -0,0 +1,10 @@ + +package org.smart.app; + +public class Util { + + public static final String utility(String s) { + System.out.println("called Util.utility(\"" + s +"\")"); + return s.toUpperCase(); + } +}
\ No newline at end of file diff --git a/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java b/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java new file mode 100644 index 000000000..7ad866ef1 --- /dev/null +++ b/docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java @@ -0,0 +1,12 @@ + +package org.smart.app; + +public class Main { + + public String persistMe; + + public static void main(String[] args) { + Main me = new Main(); + me.persistMe = Util.utility("persistMe shouting!"); + } +}
\ No newline at end of file diff --git a/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java b/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java new file mode 100644 index 000000000..971e41928 --- /dev/null +++ b/docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java @@ -0,0 +1,8 @@ + +package org.smart.app; + +public class MainTest { + public static void main(String[] args) { + Main.main(args); + } +}
\ No newline at end of file |