aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/innerInterfaces/p/InnerTest.java
blob: adc25be1fcfc191d1946b60b49ef233628321a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package p;

aspect InnerTest {
    private interface Inner {}
    declare parents: other.Test implements Inner;

    private int Inner.count = 0;

    before(Inner i): target(i) && call(* *(..)) {
        i.count++;
    }

    public static int getCallCount(Object o) {
        if (o instanceof Inner) return ((Inner)o).count;
        else return -1;
    }
}