mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-14 02:10:40 +02:00
24 lines
442 B
Java
24 lines
442 B
Java
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");
|
|
}
|
|
}
|
|
|