mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-18 02:11:48 +02:00
24 lines
430 B
Java
24 lines
430 B
Java
![]() |
// CaseSix - not an execution join point - compiler limitation
|
||
|
import java.lang.annotation.*;
|
||
|
|
||
|
public class CaseSix {
|
||
|
|
||
|
@Anno static String s;
|
||
|
|
||
|
public static void main(String []argv) {
|
||
|
s = "hello";
|
||
|
}
|
||
|
|
||
|
}
|
||
|
enum Level { NONE; }
|
||
|
|
||
|
@Retention(RetentionPolicy.RUNTIME)
|
||
|
@interface Anno { Level value() default Level.NONE; }
|
||
|
|
||
|
aspect X {
|
||
|
|
||
|
before(Level l): set(@Anno * *) && @annotation(Anno(l)) {
|
||
|
System.out.println(l);
|
||
|
}
|
||
|
}
|