summaryrefslogtreecommitdiffstats
path: root/tests/bugs1810
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2016-12-02 10:32:17 -0800
committerAndy Clement <aclement@pivotal.io>2016-12-02 10:32:17 -0800
commitd10618d25a9e995ffeb8080b3b9468ad241a163c (patch)
treee6d7392533635926c055048deb040e778fe92e20 /tests/bugs1810
parentb6f2b6337fbaf95b78c20862cd90f0e027509531 (diff)
downloadaspectj-paramAnnotationBinding.tar.gz
aspectj-paramAnnotationBinding.zip
259416: preliminary workparamAnnotationBinding
Diffstat (limited to 'tests/bugs1810')
-rw-r--r--tests/bugs1810/259416/Caveats0
-rw-r--r--tests/bugs1810/259416/ColouredAnnotation.classbin0 -> 315 bytes
-rw-r--r--tests/bugs1810/259416/ColouredAnnotation.java6
-rw-r--r--tests/bugs1810/259416/Creating0
-rw-r--r--tests/bugs1810/259416/Downloading0
-rw-r--r--tests/bugs1810/259416/Filler.java5
-rw-r--r--tests/bugs1810/259416/RGB.classbin0 -> 898 bytes
-rw-r--r--tests/bugs1810/259416/RGB.java3
-rw-r--r--tests/bugs1810/259416/Tapping0
-rw-r--r--tests/bugs1810/259416/Test1.java13
-rw-r--r--tests/bugs1810/259416/Test2.java13
-rw-r--r--tests/bugs1810/259416/Test3.java13
-rw-r--r--tests/bugs1810/259416/Test4.java13
13 files changed, 66 insertions, 0 deletions
diff --git a/tests/bugs1810/259416/Caveats b/tests/bugs1810/259416/Caveats
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/bugs1810/259416/Caveats
diff --git a/tests/bugs1810/259416/ColouredAnnotation.class b/tests/bugs1810/259416/ColouredAnnotation.class
new file mode 100644
index 000000000..ff8b19572
--- /dev/null
+++ b/tests/bugs1810/259416/ColouredAnnotation.class
Binary files differ
diff --git a/tests/bugs1810/259416/ColouredAnnotation.java b/tests/bugs1810/259416/ColouredAnnotation.java
new file mode 100644
index 000000000..1886a2f03
--- /dev/null
+++ b/tests/bugs1810/259416/ColouredAnnotation.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ColouredAnnotation {
+ RGB value();
+}
diff --git a/tests/bugs1810/259416/Creating b/tests/bugs1810/259416/Creating
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/bugs1810/259416/Creating
diff --git a/tests/bugs1810/259416/Downloading b/tests/bugs1810/259416/Downloading
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/bugs1810/259416/Downloading
diff --git a/tests/bugs1810/259416/Filler.java b/tests/bugs1810/259416/Filler.java
new file mode 100644
index 000000000..dc5592b41
--- /dev/null
+++ b/tests/bugs1810/259416/Filler.java
@@ -0,0 +1,5 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Filler {
+}
diff --git a/tests/bugs1810/259416/RGB.class b/tests/bugs1810/259416/RGB.class
new file mode 100644
index 000000000..737e3b6bb
--- /dev/null
+++ b/tests/bugs1810/259416/RGB.class
Binary files differ
diff --git a/tests/bugs1810/259416/RGB.java b/tests/bugs1810/259416/RGB.java
new file mode 100644
index 000000000..04d4e9474
--- /dev/null
+++ b/tests/bugs1810/259416/RGB.java
@@ -0,0 +1,3 @@
+public enum RGB {
+ RED, GREEN, BLUE;
+}
diff --git a/tests/bugs1810/259416/Tapping b/tests/bugs1810/259416/Tapping
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/bugs1810/259416/Tapping
diff --git a/tests/bugs1810/259416/Test1.java b/tests/bugs1810/259416/Test1.java
new file mode 100644
index 000000000..e4961f039
--- /dev/null
+++ b/tests/bugs1810/259416/Test1.java
@@ -0,0 +1,13 @@
+public class Test1 {
+ public static void main(String[] argv) {
+ coloured("abc");
+ }
+ public static void coloured(@ColouredAnnotation(RGB.RED) String param1) {}
+}
+
+aspect X {
+ // execution(@ColouredAnnotation * colouredMethod(..)) && @annotation(ColouredAnnotation(colour));
+ before(ColouredAnnotation ca): execution(* *(@ColouredAnnotation (*))) && @args(ca (*)) {
+ System.out.println("Annotation from parameter on method "+thisJoinPoint+" is "+ca);
+ }
+}
diff --git a/tests/bugs1810/259416/Test2.java b/tests/bugs1810/259416/Test2.java
new file mode 100644
index 000000000..a2a026dbc
--- /dev/null
+++ b/tests/bugs1810/259416/Test2.java
@@ -0,0 +1,13 @@
+public class Test2 {
+ public static void main(String[] argv) {
+ coloured("abc");
+ }
+ public static void coloured(@ColouredAnnotation(RGB.GREEN) String param1) {}
+}
+
+aspect X {
+ // execution(@ColouredAnnotation * colouredMethod(..)) && @annotation(ColouredAnnotation(colour));
+ before(ColouredAnnotation ca): execution(* *(..)) && @args(ca (*)) {
+ System.out.println("Annotation from parameter on method "+thisJoinPoint+" is "+ca);
+ }
+}
diff --git a/tests/bugs1810/259416/Test3.java b/tests/bugs1810/259416/Test3.java
new file mode 100644
index 000000000..49744de78
--- /dev/null
+++ b/tests/bugs1810/259416/Test3.java
@@ -0,0 +1,13 @@
+public class Test3 {
+ public static void main(String[] argv) {
+ coloured(1,"abc");
+ }
+ public static void coloured(int param1, @ColouredAnnotation(RGB.RED) String param2) {}
+}
+
+aspect X {
+ // execution(@ColouredAnnotation * colouredMethod(..)) && @annotation(ColouredAnnotation(colour));
+ before(ColouredAnnotation ca): execution(* *(..)) && @args(*, ca (*)) {
+ System.out.println("Annotation from parameter on method "+thisJoinPoint+" is "+ca);
+ }
+}
diff --git a/tests/bugs1810/259416/Test4.java b/tests/bugs1810/259416/Test4.java
new file mode 100644
index 000000000..92324f883
--- /dev/null
+++ b/tests/bugs1810/259416/Test4.java
@@ -0,0 +1,13 @@
+public class Test4 {
+ public static void main(String[] argv) {
+ coloured(1,"abc");
+ }
+ public static void coloured(int param1, @Filler @ColouredAnnotation(RGB.GREEN) String param2) {}
+}
+
+aspect X {
+ // execution(@ColouredAnnotation * colouredMethod(..)) && @annotation(ColouredAnnotation(colour));
+ before(ColouredAnnotation ca): execution(* *(..)) && @args(*, ca (*)) {
+ System.out.println("Annotation from parameter on method "+thisJoinPoint+" is "+ca);
+ }
+}