aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/EachObjectNoThis.java
blob: 306df894492ff19bed5548191dc40daa78cf50e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import org.aspectj.testing.Tester;

public class EachObjectNoThis {
    public static void main(String[] args) {
	new C().foo();
    }
}

class C {
    public void foo() {
    }
}

aspect A /*of eachobject(!instanceof(Object))*/ {
    {
	// This doesn't appy
        //Tester.checkFailed("this aspect shouldn't exist");
    }
    before(): !target(Object) && call(* *(..)) {
  	Tester.checkFailed("this aspect shouldn't exist");
    }
}