From 6739dd5b3d1c549e9b9b9b08e6a96f0688901df9 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 2 Dec 2004 10:40:38 +0000 Subject: 72766 - annotation testdata --- tests/java5/annotations/Annotation.java | 5 +++++ tests/java5/annotations/AnnotationAspect01.aj | 14 ++++++++++++++ tests/java5/annotations/SimpleAnnotation.java | 7 +++++++ tests/java5/annotations/build.xml | 11 +++++++++++ tests/java5/annotations/testcode.jar | Bin 0 -> 1041 bytes 5 files changed, 37 insertions(+) create mode 100644 tests/java5/annotations/Annotation.java create mode 100644 tests/java5/annotations/AnnotationAspect01.aj create mode 100644 tests/java5/annotations/SimpleAnnotation.java create mode 100644 tests/java5/annotations/build.xml create mode 100644 tests/java5/annotations/testcode.jar (limited to 'tests/java5') 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 @@ + + + + + + + + + + + diff --git a/tests/java5/annotations/testcode.jar b/tests/java5/annotations/testcode.jar new file mode 100644 index 000000000..574b25142 Binary files /dev/null and b/tests/java5/annotations/testcode.jar differ -- cgit v1.2.3