aboutsummaryrefslogtreecommitdiffstats
path: root/weaver/testdata
diff options
context:
space:
mode:
authoraclement <aclement>2006-02-16 18:48:49 +0000
committeraclement <aclement>2006-02-16 18:48:49 +0000
commit9ee775954d74a5387b3fd89e0002e659647e99ac (patch)
tree4a06933cc0f2ac7c512c15b628d5d65f85745302 /weaver/testdata
parent724c3374806300638f7af58f7900b2d204abf980 (diff)
downloadaspectj-9ee775954d74a5387b3fd89e0002e659647e99ac.tar.gz
aspectj-9ee775954d74a5387b3fd89e0002e659647e99ac.zip
feature: Use ASM for non-woven types: testcode
Diffstat (limited to 'weaver/testdata')
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedClass.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedFields.java5
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedMethods.java10
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedParameters.java15
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedWithClassClass.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedWithCombinedAnnotation.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotatedWithEnumClass.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotationClassElement.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotationEnumElement.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnnotationStringElement.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AnonymousClassTest.java16
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AspectFromHell.java24
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM01.java8
-rw-r--r--weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM02.java8
-rw-r--r--weaver/testdata/forAsmDelegateTesting/CombinedAnnotation.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/Complex.java13
-rw-r--r--weaver/testdata/forAsmDelegateTesting/ComplexAnnotatedClass.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/ComplexAnnotation.java13
-rw-r--r--weaver/testdata/forAsmDelegateTesting/ErasureTestData.java7
-rw-r--r--weaver/testdata/forAsmDelegateTesting/HelloWorld.java14
-rw-r--r--weaver/testdata/forAsmDelegateTesting/MarkedType.java4
-rw-r--r--weaver/testdata/forAsmDelegateTesting/MarkerAnnotation.java4
-rw-r--r--weaver/testdata/forAsmDelegateTesting/MarkerAnnotationInvisible.java4
-rw-r--r--weaver/testdata/forAsmDelegateTesting/PossibleGenericsSigs.java36
-rw-r--r--weaver/testdata/forAsmDelegateTesting/README5
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAnnotatedClass.java3
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAnnotation.java7
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAnnotation2.java8
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAnnotation3.java8
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAnnotation4.java7
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleAspect.java12
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleClass.java5
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleEnum.java1
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleGenericsProgram.java26
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleGenericsUsage.java12
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleStringAnnotation.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleType.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/SimpleVarargs.java12
-rw-r--r--weaver/testdata/forAsmDelegateTesting/VarargsClass.java9
-rw-r--r--weaver/testdata/forAsmDelegateTesting/VerySimpleAnnotation.java6
-rw-r--r--weaver/testdata/forAsmDelegateTesting/stuff.jarbin0 -> 30108 bytes
41 files changed, 353 insertions, 0 deletions
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedClass.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedClass.java
new file mode 100644
index 000000000..033d2e8e5
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedClass.java
@@ -0,0 +1,3 @@
+@AnnotationStringElement(stringval="hello")
+public class AnnotatedClass {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedFields.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedFields.java
new file mode 100644
index 000000000..a9cd8e396
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedFields.java
@@ -0,0 +1,5 @@
+public class AnnotatedFields {
+ @SimpleAnnotation3(id=1) int i;
+
+ @SimpleAnnotation3(id=2) String s;
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedMethods.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedMethods.java
new file mode 100644
index 000000000..e7c43a88e
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedMethods.java
@@ -0,0 +1,10 @@
+public class AnnotatedMethods {
+
+ @SimpleAnnotation3(id=1)
+ public void method1() {
+ }
+
+ @SimpleAnnotation3(id=2)
+ public void method2() {
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedParameters.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedParameters.java
new file mode 100644
index 000000000..9cfb2b80b
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedParameters.java
@@ -0,0 +1,15 @@
+public class AnnotatedParameters {
+
+
+ public static void main(@SimpleAnnotation(id=1) String args[]) {
+ }
+
+ public void foo(@SimpleAnnotation(id=2) int arg1,
+ @SimpleAnnotation(id=3) @AnnotationEnumElement(enumval=SimpleEnum.Red) String arg2) {
+ try {
+ throw new RuntimeException("eee");
+ } catch (@SimpleAnnotation(id=5) Exception ex) {
+ }
+ }
+
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedWithClassClass.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithClassClass.java
new file mode 100644
index 000000000..a9dc32138
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithClassClass.java
@@ -0,0 +1,3 @@
+@AnnotationClassElement(clz=Integer.class)
+public class AnnotatedWithClassClass {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedWithCombinedAnnotation.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithCombinedAnnotation.java
new file mode 100644
index 000000000..c63e6bcaf
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithCombinedAnnotation.java
@@ -0,0 +1,3 @@
+@CombinedAnnotation({@SimpleAnnotation(id=4)})
+public class AnnotatedWithCombinedAnnotation {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotatedWithEnumClass.java b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithEnumClass.java
new file mode 100644
index 000000000..5f532ff6b
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotatedWithEnumClass.java
@@ -0,0 +1,3 @@
+@AnnotationEnumElement(enumval=SimpleEnum.Red)
+public class AnnotatedWithEnumClass {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotationClassElement.java b/weaver/testdata/forAsmDelegateTesting/AnnotationClassElement.java
new file mode 100644
index 000000000..629bd2155
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotationClassElement.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AnnotationClassElement {
+ Class clz();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotationEnumElement.java b/weaver/testdata/forAsmDelegateTesting/AnnotationEnumElement.java
new file mode 100644
index 000000000..201b34ad2
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotationEnumElement.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AnnotationEnumElement {
+ SimpleEnum enumval();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnnotationStringElement.java b/weaver/testdata/forAsmDelegateTesting/AnnotationStringElement.java
new file mode 100644
index 000000000..dc68cf2e9
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnnotationStringElement.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AnnotationStringElement {
+ String stringval();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AnonymousClassTest.java b/weaver/testdata/forAsmDelegateTesting/AnonymousClassTest.java
new file mode 100644
index 000000000..ca1c50101
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AnonymousClassTest.java
@@ -0,0 +1,16 @@
+public class AnonymousClassTest {
+
+ public void foo() {
+
+ new Runnable() {
+ public void run() {};
+ }.run();
+
+
+ }
+
+ class X {}
+
+ static class Y {}
+
+} \ No newline at end of file
diff --git a/weaver/testdata/forAsmDelegateTesting/AspectFromHell.java b/weaver/testdata/forAsmDelegateTesting/AspectFromHell.java
new file mode 100644
index 000000000..def65b428
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AspectFromHell.java
@@ -0,0 +1,24 @@
+import java.util.*;
+
+public aspect AspectFromHell {
+
+ public void Foo.m1() {}
+ public int Foo.m2() {return 2;}
+ public void Foo.m3(String s) {}
+ public Foo.new(String s) {super();}
+ public int Foo.x;
+ public List Foo.y;
+
+
+ before(): execution(void Goo.m1()) {}
+ after(): execution(void Goo.m2(String)) { System.err.println(thisJoinPoint);}
+ void around(int i): execution(void Goo.m3(..)) && args(i) { }
+
+ class Goo {
+ void m1() {}
+ void m2(String s) {}
+ void m3(int i) {}
+ }
+}
+
+ class Foo { }
diff --git a/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM01.java b/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM01.java
new file mode 100644
index 000000000..e8bb5c7f5
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM01.java
@@ -0,0 +1,8 @@
+public class AttributeTestClassEM01 {
+
+ public static void main(String[]argv) {
+ class S {
+ public void sayhello() { System.err.println("hello");}
+ }
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM02.java b/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM02.java
new file mode 100644
index 000000000..b152854a6
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/AttributeTestClassEM02.java
@@ -0,0 +1,8 @@
+public class AttributeTestClassEM02 {
+
+ Runnable r = new Runnable() {
+ public void run() { System.err.println("hello");}
+ };
+ public static void main(String[]argv) {
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/CombinedAnnotation.java b/weaver/testdata/forAsmDelegateTesting/CombinedAnnotation.java
new file mode 100644
index 000000000..a262c868f
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/CombinedAnnotation.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CombinedAnnotation {
+ public SimpleAnnotation[] value();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/Complex.java b/weaver/testdata/forAsmDelegateTesting/Complex.java
new file mode 100644
index 000000000..88c17cd51
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/Complex.java
@@ -0,0 +1,13 @@
+// Class contains everything, for delegate comparing..
+
+public class Complex {
+
+ int field1;
+ String field2;
+ Foo[] field3;
+
+
+
+ static class Foo {
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/ComplexAnnotatedClass.java b/weaver/testdata/forAsmDelegateTesting/ComplexAnnotatedClass.java
new file mode 100644
index 000000000..1e6214a4a
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/ComplexAnnotatedClass.java
@@ -0,0 +1,3 @@
+@ComplexAnnotation(ival=4,bval=2,cval='5',fval=3.0f,dval=33.4,zval=false,jval=56,sval=99)
+public class ComplexAnnotatedClass {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/ComplexAnnotation.java b/weaver/testdata/forAsmDelegateTesting/ComplexAnnotation.java
new file mode 100644
index 000000000..c5a76c71e
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/ComplexAnnotation.java
@@ -0,0 +1,13 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ComplexAnnotation {
+ int ival();
+ byte bval();
+ char cval();
+ long jval();
+ double dval();
+ boolean zval();
+ short sval();
+ float fval();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/ErasureTestData.java b/weaver/testdata/forAsmDelegateTesting/ErasureTestData.java
new file mode 100644
index 000000000..493f59a14
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/ErasureTestData.java
@@ -0,0 +1,7 @@
+import java.util.*;
+
+public class ErasureTestData {
+
+ public Vector<String> getData() { return null; }
+
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/HelloWorld.java b/weaver/testdata/forAsmDelegateTesting/HelloWorld.java
new file mode 100644
index 000000000..9146fed8c
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/HelloWorld.java
@@ -0,0 +1,14 @@
+import java.io.*;
+
+public class HelloWorld {
+ public static void main(String[] argv) {
+ BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
+ String name = null;
+
+ try {
+ System.out.print("Please enter your name> ");
+ name = in.readLine();
+ } catch(IOException e) { return; }
+ System.out.println("Hello, " + name);
+ }
+ }
diff --git a/weaver/testdata/forAsmDelegateTesting/MarkedType.java b/weaver/testdata/forAsmDelegateTesting/MarkedType.java
new file mode 100644
index 000000000..2b0948438
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/MarkedType.java
@@ -0,0 +1,4 @@
+@MarkerAnnotationInvisible
+@MarkerAnnotation
+public class MarkedType {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/MarkerAnnotation.java b/weaver/testdata/forAsmDelegateTesting/MarkerAnnotation.java
new file mode 100644
index 000000000..f314a9432
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/MarkerAnnotation.java
@@ -0,0 +1,4 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MarkerAnnotation { }
diff --git a/weaver/testdata/forAsmDelegateTesting/MarkerAnnotationInvisible.java b/weaver/testdata/forAsmDelegateTesting/MarkerAnnotationInvisible.java
new file mode 100644
index 000000000..9b41a593a
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/MarkerAnnotationInvisible.java
@@ -0,0 +1,4 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.CLASS)
+public @interface MarkerAnnotationInvisible { }
diff --git a/weaver/testdata/forAsmDelegateTesting/PossibleGenericsSigs.java b/weaver/testdata/forAsmDelegateTesting/PossibleGenericsSigs.java
new file mode 100644
index 000000000..ee687b280
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/PossibleGenericsSigs.java
@@ -0,0 +1,36 @@
+import java.util.*;
+
+public class PossibleGenericsSigs {
+
+ public void a(List<String> List_String) {}
+
+ public void b(List<Double> List_Double) {}
+
+ public void c(List<? extends Number> q_extends_Number) {}
+
+ public void d(List<? super Number> q_super_Number) {}
+
+ public void e(List<?> List_q) {}
+
+ public void f(Map<?,? super Number> Map_q_q_super_Number) {}
+
+
+
+ <T extends Object & Comparable<? super T>> void r(List<T> l) {}
+
+ <T extends Object & Comparable<? super T>> T s(Collection<T> col) {return null;}
+
+ static <T extends Comparable<? super Number>> T t(Collection<T> col) {return null;}
+
+ static <T extends Comparable<T>> T u(Collection<T> col) {return null;}
+
+ <X> X v(Collection<X> x) {return null;}
+
+ public void w(List<List<List<List<List<? extends List>>>>> wtf) {}
+
+ static <T> void x(List <T> a,List<? extends T> b) {}
+
+ <T extends Number> void y(Map<T,? super Number> n) {}
+
+ static <T> void z(T[] ts,Collection<T> c) {}
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/README b/weaver/testdata/forAsmDelegateTesting/README
new file mode 100644
index 000000000..e6907208d
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/README
@@ -0,0 +1,5 @@
+Rebuilding?
+
+Just do this:
+
+ajc -1.5 *.java -outjar stuff.jar
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAnnotatedClass.java b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotatedClass.java
new file mode 100644
index 000000000..8d4e4ac95
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotatedClass.java
@@ -0,0 +1,3 @@
+@SimpleAnnotation(id=4)
+public class SimpleAnnotatedClass {
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation.java b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation.java
new file mode 100644
index 000000000..94291dc13
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation.java
@@ -0,0 +1,7 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.SOURCE)
+public @interface SimpleAnnotation {
+ int id();
+ String fruit() default "bananas";
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation2.java b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation2.java
new file mode 100644
index 000000000..64c4a77d1
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation2.java
@@ -0,0 +1,8 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.CLASS)
+public @interface SimpleAnnotation2 {
+ int id();
+ String fruit() default "bananas";
+}
+
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation3.java b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation3.java
new file mode 100644
index 000000000..2f4d94add
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation3.java
@@ -0,0 +1,8 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SimpleAnnotation3 {
+ int id();
+ String fruit() default "bananas";
+}
+
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation4.java b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation4.java
new file mode 100644
index 000000000..24a4c5977
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAnnotation4.java
@@ -0,0 +1,7 @@
+import java.lang.annotation.*;
+
+public @interface SimpleAnnotation4 {
+ int id();
+ String fruit() default "bananas";
+}
+
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleAspect.java b/weaver/testdata/forAsmDelegateTesting/SimpleAspect.java
new file mode 100644
index 000000000..b5c4abe2e
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleAspect.java
@@ -0,0 +1,12 @@
+public aspect SimpleAspect {
+ pointcut p(): call(* *(..));
+
+ before(): p() {
+
+ }
+
+ int SimpleAspect.i;
+
+ public void SimpleAspect.m() { }
+
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleClass.java b/weaver/testdata/forAsmDelegateTesting/SimpleClass.java
new file mode 100644
index 000000000..9920c4912
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleClass.java
@@ -0,0 +1,5 @@
+public class SimpleClass {
+ public static void main(String[] argv) {
+ // Nothing unusual in this class
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleEnum.java b/weaver/testdata/forAsmDelegateTesting/SimpleEnum.java
new file mode 100644
index 000000000..2df536880
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleEnum.java
@@ -0,0 +1 @@
+public enum SimpleEnum { Red,Orange,Yellow,Green,Blue,Indigo,Violet };
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleGenericsProgram.java b/weaver/testdata/forAsmDelegateTesting/SimpleGenericsProgram.java
new file mode 100644
index 000000000..2457a9155
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleGenericsProgram.java
@@ -0,0 +1,26 @@
+import java.util.*;
+
+class TreasureChest<T> {
+
+ protected Set<T> contents;
+
+ public TreasureChest() {
+ contents = new HashSet<T>();
+ }
+
+ public void add(T o) {
+ contents.add(o);
+ }
+}
+
+public class SimpleGenericsProgram {
+
+ public static void main(String []argv) {
+ TreasureChest<String> tc1 = new TreasureChest<String>();
+ TreasureChest<Integer> tc2 = new TreasureChest<Integer>();
+
+ tc1.add("dubloon");
+ tc2.add(new Integer("777"));
+
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleGenericsUsage.java b/weaver/testdata/forAsmDelegateTesting/SimpleGenericsUsage.java
new file mode 100644
index 000000000..74a8df574
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleGenericsUsage.java
@@ -0,0 +1,12 @@
+import java.util.*;
+
+public class SimpleGenericsUsage {
+
+ public static void main(String[]argv) {
+ ArrayList<String> fruits = new ArrayList<String>();
+ fruits.add("Oranges");
+ fruits.add("Apples");
+ fruits.add("Pears");
+ System.err.println(fruits.size()+" fruits defined");
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleStringAnnotation.java b/weaver/testdata/forAsmDelegateTesting/SimpleStringAnnotation.java
new file mode 100644
index 000000000..af3b5ce36
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleStringAnnotation.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SimpleStringAnnotation {
+ String fruit();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleType.java b/weaver/testdata/forAsmDelegateTesting/SimpleType.java
new file mode 100644
index 000000000..2b0563bba
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleType.java
@@ -0,0 +1,6 @@
+class SimpleType {
+ public Integer i;
+
+ public void setI(Integer i) { this.i=i;}
+ public Integer getI() { return i;}
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/SimpleVarargs.java b/weaver/testdata/forAsmDelegateTesting/SimpleVarargs.java
new file mode 100644
index 000000000..3994d2cfb
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/SimpleVarargs.java
@@ -0,0 +1,12 @@
+
+public class SimpleVarargs {
+ public static void main(String[] argv) {
+ callfoo("a","b","c","d","e");
+ }
+
+ public static void callfoo(Object... args) {
+ for (int i = 0 ; i<args.length;i++) {
+ System.err.println(args[i]);
+ }
+ }
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/VarargsClass.java b/weaver/testdata/forAsmDelegateTesting/VarargsClass.java
new file mode 100644
index 000000000..c50e45e92
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/VarargsClass.java
@@ -0,0 +1,9 @@
+public class VarargsClass {
+
+ public void foo(String abc,String... args) { }
+
+ public void goo(String... args) { }
+
+ public void hoo() {}
+
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/VerySimpleAnnotation.java b/weaver/testdata/forAsmDelegateTesting/VerySimpleAnnotation.java
new file mode 100644
index 000000000..375ab3cbf
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/VerySimpleAnnotation.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface VerySimpleAnnotation {
+ int id();
+}
diff --git a/weaver/testdata/forAsmDelegateTesting/stuff.jar b/weaver/testdata/forAsmDelegateTesting/stuff.jar
new file mode 100644
index 000000000..5704dbb2d
--- /dev/null
+++ b/weaver/testdata/forAsmDelegateTesting/stuff.jar
Binary files differ