aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/ReferringToPointcutsInAspect_PR316.java
blob: de13064509ed7a22e5d0b46bf2daa043df7c2b24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import org.aspectj.testing.Tester; 
public class ReferringToPointcutsInAspect_PR316 {
    public static void main(String[] args) {
        new C().f();
        Tester.checkAllEvents();
    }
    static {
        Tester.expectEvent("void-f");
        Tester.expectEvent("before-f");
    }
}

class C {
    public void f() { Tester.event("void-f"); }
}

aspect A /*of eachobject(i())*/ {
    pointcut i(): target(C);
    before(): i() && execution(* f(..)) { Tester.event("before-f"); }
}