summaryrefslogtreecommitdiffstats
path: root/tests/java5
diff options
context:
space:
mode:
authoraclement <aclement>2004-12-02 10:40:38 +0000
committeraclement <aclement>2004-12-02 10:40:38 +0000
commit6739dd5b3d1c549e9b9b9b08e6a96f0688901df9 (patch)
treef1b657c5cb0e9c81e352a69b310f8239ebd4e0f0 /tests/java5
parenta618695205c17beebfd56a24bb3e0a9c24911ff0 (diff)
downloadaspectj-6739dd5b3d1c549e9b9b9b08e6a96f0688901df9.tar.gz
aspectj-6739dd5b3d1c549e9b9b9b08e6a96f0688901df9.zip
72766 - annotation testdata
Diffstat (limited to 'tests/java5')
-rw-r--r--tests/java5/annotations/Annotation.java5
-rw-r--r--tests/java5/annotations/AnnotationAspect01.aj14
-rw-r--r--tests/java5/annotations/SimpleAnnotation.java7
-rw-r--r--tests/java5/annotations/build.xml11
-rw-r--r--tests/java5/annotations/testcode.jarbin0 -> 1041 bytes
5 files changed, 37 insertions, 0 deletions
diff --git a/tests/java5/annotations/Annotation.java b/tests/java5/annotations/Annotation.java
new file mode 100644
index 000000000..dee42f7a0
--- /dev/null
+++ b/tests/java5/annotations/Annotation.java
@@ -0,0 +1,5 @@
+package java.lang.annotation;
+
+// Fake class we can use in the absence of Java5
+public class Annotation {
+}
diff --git a/tests/java5/annotations/AnnotationAspect01.aj b/tests/java5/annotations/AnnotationAspect01.aj
new file mode 100644
index 000000000..5eed11ee8
--- /dev/null
+++ b/tests/java5/annotations/AnnotationAspect01.aj
@@ -0,0 +1,14 @@
+public aspect AnnotationAspect01 {
+
+ // ITDC - not allowed
+ public SimpleAnnotation.new(int i) {
+ }
+
+ // ITDM - not allowed
+ public int SimpleAnnotation.newMember(int i) {
+ return 75346;
+ }
+
+ // ITDF - not allowed
+ public int SimpleAnnotation.newField;
+}
diff --git a/tests/java5/annotations/SimpleAnnotation.java b/tests/java5/annotations/SimpleAnnotation.java
new file mode 100644
index 000000000..5b4303755
--- /dev/null
+++ b/tests/java5/annotations/SimpleAnnotation.java
@@ -0,0 +1,7 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SimpleAnnotation {
+ int id();
+ String fruit() default "bananas";
+}
diff --git a/tests/java5/annotations/build.xml b/tests/java5/annotations/build.xml
new file mode 100644
index 000000000..7170813dc
--- /dev/null
+++ b/tests/java5/annotations/build.xml
@@ -0,0 +1,11 @@
+<project name="Java 5 compilation of test source" default="default" basedir=".">
+
+ <target name="default">
+ <delete dir="output" failonerror="false"/>
+ <mkdir dir="output"/>
+ <javac destdir="output" debug="on" srcdir="." includes="*.java"/>
+ <zip file="testcode.jar" basedir="output" includes="*"/>
+ <delete dir="output"/>
+ </target>
+
+</project>
diff --git a/tests/java5/annotations/testcode.jar b/tests/java5/annotations/testcode.jar
new file mode 100644
index 000000000..574b25142
--- /dev/null
+++ b/tests/java5/annotations/testcode.jar
Binary files differ