aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/AbstractAspectsExtendingAbstractAspectsGeneratesMethodsWithTheSameName_PR464.java
blob: a16c1e86b950250161a02339e22d05a26661a000 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import org.aspectj.testing.Tester; 
public class AbstractAspectsExtendingAbstractAspectsGeneratesMethodsWithTheSameName_PR464 {
    public static void main(String[] args) {
        new AbstractAspectsExtendingAbstractAspectsGeneratesMethodsWithTheSameName_PR464().realMain(args);
    }
    public void realMain(String[] args) {
        new C().c();
        // No tests to actually run.  The point is that all advice is abstract!
        //Tester.checkAllEvents();
    }
    static {
        //Tester.expectEventsInString("AspectA.star,AspectA.c");
        //Tester.expectEventsInString("AspectB.star,AspectB.c");
        //Tester.expectEventsInString("AspectC.star,AspectC.c");
    }
}

class C {
    public void c() {}
}

abstract aspect AspectA {   
    before() : execution(* *(..)) {
        Tester.event("AspectA.star");
    }
    
    before() : execution(* c(..)) {
        Tester.event("AspectA.c");
    } 
}

abstract aspect AspectB extends AspectA {

    before() : execution(* *(..)) {
       Tester.event("AspectB.star");
    }

    before() : execution(* c(..)) {
        Tester.event("AspectB.c");
    }    
}

abstract aspect AspectC extends AspectB {
    before() : execution(* *(..)) {
        Tester.event("AspectC.star");
    }

    before() : execution(* c(..)) {
        Tester.event("AspectC.c");
    } 
}