mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-13 23:55:51 +02:00
27 lines
421 B
Java
27 lines
421 B
Java
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) { }
|
|
} |