package fish;
-import main.Main;
privileged aspect B {
private static String privateStatic = "B's private";
//introduction PrivateClass {
public void PrivateClass.fooB() {
b--;
- Main.doThang("B: " + b);
- Main.doThang("B: " + b());
+ main.Main.doThang("B: " + b);
+ main.Main.doThang("B: " + b());
System.out.println(privateStatic + "::" + FooC.privateStatic);
}
before(PrivateClass obj): call(void PrivateClass.goo()) && target(obj) {
obj.b--;
- Main.doThang("B: " + obj.b);
- Main.doThang("B: " + obj.b());
+ main.Main.doThang("B: " + obj.b);
+ main.Main.doThang("B: " + obj.b());
}
}
package fish;
-import main.Main;
public class PrivateClass {
private int a = 999;
public void PrivateClass.fooA() {
a--;
- Main.doThang("A: " + a);
- Main.doThang("A: " + a());
+ main.Main.doThang("A: " + a);
+ main.Main.doThang("A: " + a());
}
before(PrivateClass obj): call(void PrivateClass.goo()) && target(obj) {
obj.a--;
- Main.doThang("A: " + obj.a);
- Main.doThang("A: " + obj.a());
+ main.Main.doThang("A: " + obj.a);
+ main.Main.doThang("A: " + obj.a());
}
}
package fowl;
-import fish.PrivateClass;
-import main.Main;
+import fish.*;
privileged aspect C {
- public void PrivateClass.fooC() {
+ public void fish.PrivateClass.fooC() {
c--;
- Main.doThang("C: " + c);
- Main.doThang("C: " + c());
+ main.Main.doThang("C: " + c);
+ main.Main.doThang("C: " + c());
}
before(PrivateClass obj): call(void PrivateClass.goo()) && target(obj) {
obj.c--;
- Main.doThang("C: " + obj.c);
- Main.doThang("C: " + obj.c());
+ main.Main.doThang("C: " + obj.c);
+ main.Main.doThang("C: " + obj.c());
}
}
package fowl;
-import main.Main;
privileged aspect D {
public void fish.PrivateClass.fooD() {
d--;
- Main.doThang("D: " + d);
- Main.doThang("D: " + d());
+ main.Main.doThang("D: " + d);
+ main.Main.doThang("D: " + d());
}
before(fish.PrivateClass obj): call(void fish.PrivateClass.goo()) && target(obj) {
obj.d--;
- Main.doThang("D: " + obj.d);
- Main.doThang("D: " + obj.d());
+ main.Main.doThang("D: " + obj.d);
+ main.Main.doThang("D: " + obj.d());
}
}