]> source.dussan.org Git - aspectj.git/commitdiff
tests for devguide script example
authorwisberg <wisberg>
Tue, 27 May 2003 09:30:21 +0000 (09:30 +0000)
committerwisberg <wisberg>
Tue, 27 May 2003 09:30:21 +0000 (09:30 +0000)
docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java [new file with mode: 0644]
docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java [new file with mode: 0644]
docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java [new file with mode: 0644]
docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java [new file with mode: 0644]

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 (file)
index 0000000..c0073c3
--- /dev/null
@@ -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 (file)
index 0000000..19e4a00
--- /dev/null
@@ -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 (file)
index 0000000..7ad866e
--- /dev/null
@@ -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 (file)
index 0000000..971e419
--- /dev/null
@@ -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