aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features161/optimizedAnnotationBinding/CaseEight.java
diff options
context:
space:
mode:
authoraclement <aclement>2008-05-31 03:30:13 +0000
committeraclement <aclement>2008-05-31 03:30:13 +0000
commitea4ce887e128cf0182ccbf764a171137ea659272 (patch)
treed25da855a6bca33f2369c192deb5f71a1e9014d6 /tests/features161/optimizedAnnotationBinding/CaseEight.java
parent8892246b8670e80c47339e7e9257350dc9b6063f (diff)
downloadaspectj-ea4ce887e128cf0182ccbf764a171137ea659272.tar.gz
aspectj-ea4ce887e128cf0182ccbf764a171137ea659272.zip
234943: testcode
Diffstat (limited to 'tests/features161/optimizedAnnotationBinding/CaseEight.java')
-rw-r--r--tests/features161/optimizedAnnotationBinding/CaseEight.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/features161/optimizedAnnotationBinding/CaseEight.java b/tests/features161/optimizedAnnotationBinding/CaseEight.java
new file mode 100644
index 000000000..58460069a
--- /dev/null
+++ b/tests/features161/optimizedAnnotationBinding/CaseEight.java
@@ -0,0 +1,35 @@
+// CaseEight - annotations in packages two
+package p.q.r;
+
+import java.lang.annotation.*;
+
+public class CaseEight {
+
+ public static void main(String []argv) {
+ CaseEight o = new CaseEight();
+ o.a();
+ o.b();
+ o.c();
+ o.d();
+ o.e();
+ }
+
+ public void a() {}
+ @Anno(Level.NONE) public void b() {}
+ @Anno(Level.ONE) public void c() {}
+ @Anno(Level.TWO) public void d() {}
+ @Anno(Level.THREE) public void e() {}
+
+ }
+
+ enum Level { NONE, ONE, TWO, THREE; }
+
+ @Retention(RetentionPolicy.RUNTIME)
+ @interface Anno { Level value();}
+
+aspect X {
+
+ before(p.q.r.Level l): execution(@Anno !@Anno(Level.NONE) * *(..)) && @annotation(Anno(l)) {
+ System.out.println(l);
+ }
+}