aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/AbstractPointcutAccess.java
blob: 83846dfea3039c3c36d7ce80f2967b654367177b (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
import org.aspectj.testing.Tester; 

/** @testcase PR#619 direct use outside aspect of defined abstract pointcut */
public abstract aspect AbstractPointcutAccess { 
    public static void main (String[] args) {
        Tester.event("main");
        Tester.checkAllEvents();
    } 
    static {
        Tester.expectEvent("main");
        Tester.expectEvent("used");
    }
    
    abstract pointcut abstractPointcut();
} 
aspect ConcretePointcutAccess extends AbstractPointcutAccess {
    pointcut abstractPointcut() : execution(void main(..));
}

aspect AbstractPointcutUser { 
    before () : ConcretePointcutAccess.abstractPointcut() {
        Tester.event("used");
    }
}