--- /dev/null
+
+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
--- /dev/null
+
+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
--- /dev/null
+
+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
--- /dev/null
+
+package org.smart.app;
+
+public class MainTest {
+ public static void main(String[] args) {
+ Main.main(args);
+ }
+}
\ No newline at end of file