aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/privilegedAspects/fish/PrivateClass.java
blob: a5b0593a6fdff61697e3d885e66bf0cdfb66ff6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package fish;

public class PrivateClass {
    private int a = 999;
    private int a() { return 888; }
    private int b = 777;
    private int b() { return 666; }
    private int c = 555;
    private int c() { return 444; }
    private int d = 333;
    private int d() { return 222; }

    public void goo() {}
}

privileged aspect A {
    
    public void PrivateClass.fooA() {
        a--;
        main.Main.doThang("A: " + a);
        main.Main.doThang("A: " + a());
    }
    
    before(PrivateClass obj): call(void PrivateClass.goo()) && target(obj) {
	obj.a--;
	main.Main.doThang("A: " + obj.a);
	main.Main.doThang("A: " + obj.a());
    }
}