diff options
Diffstat (limited to 'tests/features160/parameterValueMatching/Parsing.java')
-rw-r--r-- | tests/features160/parameterValueMatching/Parsing.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/features160/parameterValueMatching/Parsing.java b/tests/features160/parameterValueMatching/Parsing.java new file mode 100644 index 000000000..f541a8610 --- /dev/null +++ b/tests/features160/parameterValueMatching/Parsing.java @@ -0,0 +1,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) * *(..)); +}
\ No newline at end of file |