aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/ThisJoinPointAssignments.java
blob: f7b6d4971f2417ae718753f6bd949046a3bb6fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
public class ThisJoinPointAssignments {
    public static void main(String[] args) {
        new ThisJoinPointAssignments().realMain(args);
    }
    public void realMain(String[] args) {
        new C().f();
        org.aspectj.testing.Tester.check(A.jp != null, "Didn't set the JoinPoint");
    }
}

class C {
    public void f() {}
}

aspect A {
    static org.aspectj.lang.JoinPoint jp;
    before(): call(void C.f()) {
        jp = thisJoinPoint;
    }
}