aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs151
diff options
context:
space:
mode:
authoraclement <aclement>2006-01-23 15:21:18 +0000
committeraclement <aclement>2006-01-23 15:21:18 +0000
commit28f8c695ccc8513e9dcbe0c4fb6ebdc71cf84313 (patch)
tree7ed9332096b0febfd74288f1fd16d25d2623793e /tests/bugs151
parent01a8b2eb36e1a34c80697c2034f9657b74dc281a (diff)
downloadaspectj-28f8c695ccc8513e9dcbe0c4fb6ebdc71cf84313.tar.gz
aspectj-28f8c695ccc8513e9dcbe0c4fb6ebdc71cf84313.zip
test and fix for 124654: generic annotation matching..
Diffstat (limited to 'tests/bugs151')
-rw-r--r--tests/bugs151/pr124654/GenericAnnotation.java15
-rw-r--r--tests/bugs151/pr124654/TestSubAspect.java19
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs151/pr124654/GenericAnnotation.java b/tests/bugs151/pr124654/GenericAnnotation.java
new file mode 100644
index 000000000..1bb725b55
--- /dev/null
+++ b/tests/bugs151/pr124654/GenericAnnotation.java
@@ -0,0 +1,15 @@
+import java.lang.annotation.Annotation;
+
+public abstract aspect GenericAnnotation<A extends Annotation> {
+
+ pointcut annotatedCall(A a) : call(@A * *.*(..)) && @annotation(a);
+
+ before(A a) : annotatedCall(a) {
+ System.err.println("Reference pointcut advice. "+a.annotationType());
+ }
+
+ before(A a) : call(@A * *.*(..)) && @annotation(a) {
+ System.err.println("Inlined pointcut advice. "+a.annotationType());
+ }
+
+}
diff --git a/tests/bugs151/pr124654/TestSubAspect.java b/tests/bugs151/pr124654/TestSubAspect.java
new file mode 100644
index 000000000..4af2d303f
--- /dev/null
+++ b/tests/bugs151/pr124654/TestSubAspect.java
@@ -0,0 +1,19 @@
+import java.lang.annotation.*;
+
+public aspect TestSubAspect extends GenericAnnotation<MyAnnotation> {
+
+ public static void main(String []argv) {
+ new BasicType().run();
+ }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface MyAnnotation {}
+
+
+class BasicType {
+ @MyAnnotation
+ public void run() {
+ System.err.println("run running");
+ }
+}