summaryrefslogtreecommitdiff
path: root/test/support
diff options
context:
space:
mode:
Diffstat (limited to 'test/support')
-rw-r--r--test/support/annotations/NestedAnnotations.java25
-rw-r--r--test/support/annotations/OuterEnum.java5
-rw-r--r--test/support/annotations/OuterTParams.java6
-rw-r--r--test/support/annotations/SourceAnnotation.java9
-rwxr-xr-xtest/support/annotations/mkAnnotationsJar.sh28
5 files changed, 73 insertions, 0 deletions
diff --git a/test/support/annotations/NestedAnnotations.java b/test/support/annotations/NestedAnnotations.java
new file mode 100644
index 0000000000..8f2327dcce
--- /dev/null
+++ b/test/support/annotations/NestedAnnotations.java
@@ -0,0 +1,25 @@
+package test;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+public class NestedAnnotations {
+
+ @OuterAnno(inner=@InnerAnno(name="inner"))
+ String field;
+
+ @Target({FIELD})
+ @Retention(RUNTIME)
+ public static @interface InnerAnno {
+ String name();
+ }
+
+ @Target({FIELD})
+ @Retention(RUNTIME)
+ public static @interface OuterAnno {
+ InnerAnno inner();
+ }
+}
diff --git a/test/support/annotations/OuterEnum.java b/test/support/annotations/OuterEnum.java
new file mode 100644
index 0000000000..75d3f34223
--- /dev/null
+++ b/test/support/annotations/OuterEnum.java
@@ -0,0 +1,5 @@
+package enums;
+
+public class OuterEnum {
+ public enum Foo { Bar }
+}
diff --git a/test/support/annotations/OuterTParams.java b/test/support/annotations/OuterTParams.java
new file mode 100644
index 0000000000..1d3db49fcf
--- /dev/null
+++ b/test/support/annotations/OuterTParams.java
@@ -0,0 +1,6 @@
+public class OuterTParams<A> {
+ class InnerClass {
+ // Cannot parse method signature: "()TA;"
+ public A method() { return null; }
+ }
+}
diff --git a/test/support/annotations/SourceAnnotation.java b/test/support/annotations/SourceAnnotation.java
new file mode 100644
index 0000000000..047751ddfe
--- /dev/null
+++ b/test/support/annotations/SourceAnnotation.java
@@ -0,0 +1,9 @@
+package test;
+
+import java.lang.annotation.*;
+
+@Retention(value=RetentionPolicy.RUNTIME)
+public @interface SourceAnnotation {
+ public String value();
+ public String[] mails() default { "bill.gates@bloodsuckers.com" };
+}
diff --git a/test/support/annotations/mkAnnotationsJar.sh b/test/support/annotations/mkAnnotationsJar.sh
new file mode 100755
index 0000000000..3d69351165
--- /dev/null
+++ b/test/support/annotations/mkAnnotationsJar.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+##############################################################################
+# Author : Nikolay Mihaylov
+##############################################################################
+
+##############################################################################
+# variables
+
+OBJDIR=./classes
+
+if [ -z "${JAVA_HOME}" ]; then
+ echo "environment variable JAVA_HOME is undefined."
+ exit
+fi
+
+JAVAC=${JAVA_HOME}/bin/javac
+JAVAC_OPTIONS="-source 1.5 -target 1.5"
+
+JAR=${JAVA_HOME}/bin/jar
+
+##############################################################################
+# commands
+
+mkdir -p ${OBJDIR}
+${JAVAC} ${JAVAC_OPTIONS} -d ${OBJDIR} SourceAnnotation.java NestedAnnotations.java
+${JAR} cf ../lib/annotations.jar -C ${OBJDIR} .
+rm -rf ${OBJDIR}