org.aspectj/tests/bugs152/pr138158/Foo.java

27 lines
421 B
Java
Raw Normal View History

2006-04-24 12:18:27 +02:00
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@interface Goo {}
public class Foo {
public static void main(String []argv) {
new Foo().m();
}
@Goo
public void m() {
System.err.println("");
}
public void m2() {
System.err.println("");
}
}
aspect X {
before(): call(* println(..)) && !@withincode(Goo) { }
before(): call(* println(..)) && @withincode(Goo) { }
}