diff options
Diffstat (limited to 'tests/features161/optimizedAnnotationBinding/CaseTen.java')
-rw-r--r-- | tests/features161/optimizedAnnotationBinding/CaseTen.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/features161/optimizedAnnotationBinding/CaseTen.java b/tests/features161/optimizedAnnotationBinding/CaseTen.java new file mode 100644 index 000000000..daa2d4837 --- /dev/null +++ b/tests/features161/optimizedAnnotationBinding/CaseTen.java @@ -0,0 +1,34 @@ +// CaseTen - binding multiple things +import java.lang.annotation.*; + +public class CaseTen { + + public static void main(String []argv) { + + CaseTen o = new CaseTen(); + o.a(1); + o.b(2); + o.c(3); + o.d(4); + o.e(5); + } + + public void a(int i) {} + @Anno(Level.NONE) public void b(int i) {} + @Anno(Level.ONE) public void c(int i) {} + @Anno(Level.TWO) public void d(int i) {} + @Anno(Level.THREE) public void e(int i) {} + +} + +enum Level { NONE, ONE, TWO, THREE; } + +@Retention(RetentionPolicy.RUNTIME) +@interface Anno { Level value();} + +aspect X { + + before(Level l,int i): execution(@Anno !@Anno(Level.NONE) * *(..)) && @annotation(Anno(l)) && args(i) { + System.out.println(l+":"+i); + } +} |