aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs163/pr256669/Two.java
diff options
context:
space:
mode:
authoraclement <aclement>2008-11-27 21:30:47 +0000
committeraclement <aclement>2008-11-27 21:30:47 +0000
commit48ba3fea26bf31e702199528bd461eaff4cc535c (patch)
tree31719f1e83effb1d6c808e45ce03266d2b7b10b5 /tests/bugs163/pr256669/Two.java
parent155a888d39e73a70fd4fe47de2c37ed593bb5459 (diff)
downloadaspectj-48ba3fea26bf31e702199528bd461eaff4cc535c.tar.gz
aspectj-48ba3fea26bf31e702199528bd461eaff4cc535c.zip
256669: itd parameter annotations copied to target
Diffstat (limited to 'tests/bugs163/pr256669/Two.java')
-rw-r--r--tests/bugs163/pr256669/Two.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs163/pr256669/Two.java b/tests/bugs163/pr256669/Two.java
new file mode 100644
index 000000000..795825e51
--- /dev/null
+++ b/tests/bugs163/pr256669/Two.java
@@ -0,0 +1,31 @@
+import java.lang.reflect.*;
+import java.lang.annotation.*;
+
+
+class Destination {}
+
+aspect Introduction {
+ // static ITD
+ public static String Destination.helloWorld(@SomeAnnotation("xyz") String who) {
+ return "Hello " + who;
+ }
+}
+
+public class Two {
+ public static void main(String[] argv) throws Exception {
+ Class<Destination> clazz = Destination.class;
+ Method m = clazz.getMethod("helloWorld", String.class);
+ Annotation[] ann = m.getAnnotations();
+ for (int i = 0; i < m.getParameterAnnotations().length; i++) {
+ int count = m.getParameterAnnotations()[i].length;
+ System.out.println("Parameter " + i + " has " + count + " parameter annotations");
+ }
+
+ }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.PARAMETER)
+@interface SomeAnnotation {
+ String value() default "";
+}