Browse Source

tests for devguide script example

tags/V1_1_0
wisberg 21 years ago
parent
commit
e289da390e

+ 11
- 0
docs/test/antScriptTest/ec/int/src/org/smart/persist/Persist.java View File

@@ -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);
}
}

+ 10
- 0
docs/test/antScriptTest/ec/module/src/org/smart/app/Util.java View File

@@ -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();
}
}

+ 12
- 0
docs/test/antScriptTest/ec/project/src/org/smart/app/Main.java View File

@@ -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!");
}
}

+ 8
- 0
docs/test/antScriptTest/ec/project/testsrc/org/smart/app/MainTest.java View File

@@ -0,0 +1,8 @@

package org.smart.app;

public class MainTest {
public static void main(String[] args) {
Main.main(args);
}
}

Loading…
Cancel
Save