aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features160/parameterValueMatching/Parsing.java
blob: f541a8610d29e0e56bdc467ff4ad9ecafce5171d (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
30
31
32
enum Color { RED, GREEN, AMBER }

@interface TrafficLight {
	Color value() default Color.RED;
}

public class Parsing {
	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 {	
  pointcut p1(): execution(@TrafficLight(Color.GREEN) * *(..));
  pointcut p2(): execution(@TrafficLight(a=Color.GREEN) * *(..));
  pointcut p3(): execution(@TrafficLight(a=Color.RED,c=Color.RED) * *(..));
  pointcut p4(): execution(@TrafficLight(a=Color.RED,c=Color.RED,e=Color.RED) * *(..));
}