summaryrefslogtreecommitdiffstats
path: root/tests/new/subaspects/AbstractAspectUsedStatically.java
blob: 272e9279bfe878eaa137379909bceca744da0ce2 (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.*;

/** @testcase PR#647 abstract aspect used statically should not cause instantiation of advice or pointcut */
public abstract aspect AbstractAspectUsedStatically {
    public static void main (String[] args) {
        Tester.event("main");
        Tester.checkAllEvents();
    } 
    static {
        Tester.expectEvent("main");
    }
    
    before() : definePrivate() {
        Tester.check(false, "definePrivate");
    }

    /** private must be implemented in defining class */
    private pointcut definePrivate() : execution(void main(..));
}