blob: d70e2a8a864864f61a1f5cb257d7ad0c53a14dcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
enum Color { RED, GREEN, AMBER }
@interface TrafficLight {
Color value() default Color.RED;
}
public class Simple {
public static void main(String[] args) {
}
}
class Marked {
public void a() {}
@TrafficLight
public void b() {}
@TrafficLight(Color.RED)
public void c() {}
@TrafficLight(Color.GREEN)
public void d() {}
}
aspect X {
before(): execution(@TrafficLight(Color.RED) * *(..)) {}
}
|