diff options
author | aclement <aclement> | 2008-06-01 20:47:17 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-06-01 20:47:17 +0000 |
commit | 08234af1749cc56c8c6b4b8f5cebff333609d21a (patch) | |
tree | bec2d2a6ef5716325692c7a621911d43b932a03b /tests/features161/optimizedAnnotationBinding/CaseThirteen.java | |
parent | 6b0a1b5e1e31c4c4cc949bcd32579f301bc63ecb (diff) | |
download | aspectj-08234af1749cc56c8c6b4b8f5cebff333609d21a.tar.gz aspectj-08234af1749cc56c8c6b4b8f5cebff333609d21a.zip |
234934: bug fix - npe
Diffstat (limited to 'tests/features161/optimizedAnnotationBinding/CaseThirteen.java')
-rw-r--r-- | tests/features161/optimizedAnnotationBinding/CaseThirteen.java | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/features161/optimizedAnnotationBinding/CaseThirteen.java b/tests/features161/optimizedAnnotationBinding/CaseThirteen.java new file mode 100644 index 000000000..e540a12c9 --- /dev/null +++ b/tests/features161/optimizedAnnotationBinding/CaseThirteen.java @@ -0,0 +1,35 @@ +import java.lang.annotation.*; + +public class CaseThirteen { + + public static void main(String []argv) { + + CaseThirteen o = new CaseThirteen(); + o.a(); + o.b(); + o.c(); + o.d(); + o.e(); + } + + public void a() {} + @Anno(value=Level.NONE,c=Color.RED) public void b() {} + @Anno(value=Level.ONE) public void c() {} + @Anno(value=Level.TWO,c=Color.GREEN) public void d() {} + @Anno(value=Level.THREE,c=Color.BLUE) public void e() {} + +} + +enum Level { NONE, ONE, TWO, THREE; } +enum Color { RED, GREEN, BLUE; } + +@Retention(RetentionPolicy.RUNTIME) +@interface Anno { Level value(); Color c() default Color.GREEN; } + +aspect X { + + before(String l): execution(@Anno !@Anno(Level.NONE) * *(..)) && @annotation(Anno(l)) && @annotation(Anno(c)) { + System.out.println(l+""+c); + } +} + |