blob: f501df84a88dcc73f4188995b2405a331317e226 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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);
}
}
|