diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2011-08-31 10:29:34 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2011-08-31 10:29:34 +0000 |
commit | d72870bfb6b09927e10944bdd129ce18dfcf7366 (patch) | |
tree | 27f56e4d1523a8cecc8976df60155e6b8429e504 /src/test/test2 | |
parent | 76a1cba9c433e8242bb6648e72b3ed43c7a4995a (diff) | |
download | javassist-d72870bfb6b09927e10944bdd129ce18dfcf7366.tar.gz javassist-d72870bfb6b09927e10944bdd129ce18dfcf7366.zip |
JvstTest test case.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@589 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/test/test2')
90 files changed, 524 insertions, 0 deletions
diff --git a/src/test/test2/AddCatchForConstructor.class b/src/test/test2/AddCatchForConstructor.class Binary files differnew file mode 100644 index 00000000..9b5e937f --- /dev/null +++ b/src/test/test2/AddCatchForConstructor.class diff --git a/src/test/test2/AddCatchForConstructor.java b/src/test/test2/AddCatchForConstructor.java new file mode 100644 index 00000000..f604f99f --- /dev/null +++ b/src/test/test2/AddCatchForConstructor.java @@ -0,0 +1,13 @@ +package test2;
+
+public class AddCatchForConstructor {
+ int i;
+ public AddCatchForConstructor() {
+ this(3);
+ i++;
+ }
+
+ public AddCatchForConstructor(int k) {
+ i = k;
+ }
+}
diff --git a/src/test/test2/AddLocalVar.class b/src/test/test2/AddLocalVar.class Binary files differnew file mode 100644 index 00000000..ad5f1d94 --- /dev/null +++ b/src/test/test2/AddLocalVar.class diff --git a/src/test/test2/AddLocalVar.java b/src/test/test2/AddLocalVar.java new file mode 100644 index 00000000..7885b65a --- /dev/null +++ b/src/test/test2/AddLocalVar.java @@ -0,0 +1,8 @@ +package test2;
+
+public class AddLocalVar {
+ public int foo() {
+ int j = 1;
+ return j;
+ }
+}
diff --git a/src/test/test2/AddMethod.java b/src/test/test2/AddMethod.java new file mode 100644 index 00000000..a7179e6e --- /dev/null +++ b/src/test/test2/AddMethod.java @@ -0,0 +1,9 @@ +package test2;
+
+public class AddMethod {
+ private int f;
+
+ public int f() { return 0; }
+ public AddMethod() {}
+ public int f(int i) { return i; }
+}
diff --git a/src/test/test2/Anon.java b/src/test/test2/Anon.java new file mode 100644 index 00000000..a6ccd8f0 --- /dev/null +++ b/src/test/test2/Anon.java @@ -0,0 +1,7 @@ +package test2;
+
+public class Anon {
+ public Object make() {
+ return new Object() { int k; };
+ }
+}
diff --git a/src/test/test2/ArrayAndNull.java b/src/test/test2/ArrayAndNull.java new file mode 100644 index 00000000..52b8b973 --- /dev/null +++ b/src/test/test2/ArrayAndNull.java @@ -0,0 +1,9 @@ +package test2; + +public class ArrayAndNull { + public int[] test() { + int[] arr = { 1, 2 }; + arr = null; + return arr; + } +} diff --git a/src/test/test2/ArrayInit.class b/src/test/test2/ArrayInit.class Binary files differnew file mode 100644 index 00000000..1786a0e6 --- /dev/null +++ b/src/test/test2/ArrayInit.class diff --git a/src/test/test2/ArrayLenTest.class b/src/test/test2/ArrayLenTest.class Binary files differnew file mode 100644 index 00000000..0987cc07 --- /dev/null +++ b/src/test/test2/ArrayLenTest.class diff --git a/src/test/test2/ArrayLenTest.java b/src/test/test2/ArrayLenTest.java new file mode 100644 index 00000000..52fe85f2 --- /dev/null +++ b/src/test/test2/ArrayLenTest.java @@ -0,0 +1,5 @@ +package test2;
+
+public class ArrayLenTest {
+ public int length = 1;
+}
diff --git a/src/test/test2/ArrayLength.class b/src/test/test2/ArrayLength.class Binary files differnew file mode 100644 index 00000000..9577874c --- /dev/null +++ b/src/test/test2/ArrayLength.class diff --git a/src/test/test2/Brennan.class b/src/test/test2/Brennan.class Binary files differnew file mode 100644 index 00000000..9c7f3954 --- /dev/null +++ b/src/test/test2/Brennan.class diff --git a/src/test/test2/Brennan.java b/src/test/test2/Brennan.java new file mode 100644 index 00000000..e93e00a9 --- /dev/null +++ b/src/test/test2/Brennan.java @@ -0,0 +1,5 @@ +package test2; + +public class Brennan { + private Object format = null; +} diff --git a/src/test/test2/CodeGen.class b/src/test/test2/CodeGen.class Binary files differnew file mode 100644 index 00000000..65c24e6c --- /dev/null +++ b/src/test/test2/CodeGen.class diff --git a/src/test/test2/CodeGen.java b/src/test/test2/CodeGen.java new file mode 100644 index 00000000..d3df0d8b --- /dev/null +++ b/src/test/test2/CodeGen.java @@ -0,0 +1,15 @@ +package test2;
+
+public class CodeGen {
+ public String msg = "";
+ public int seven() { return 7; }
+
+ public String seven(String s) { return s + 7; }
+
+ public String six(String s) { return s + 6; }
+
+ public int run() {
+ System.out.println("done.");
+ return msg.length();
+ }
+}
diff --git a/src/test/test2/CodeGen2.class b/src/test/test2/CodeGen2.class Binary files differnew file mode 100644 index 00000000..fea25cc5 --- /dev/null +++ b/src/test/test2/CodeGen2.class diff --git a/src/test/test2/ConstBody.class b/src/test/test2/ConstBody.class Binary files differnew file mode 100644 index 00000000..41175d14 --- /dev/null +++ b/src/test/test2/ConstBody.class diff --git a/src/test/test2/ConstBody.java b/src/test/test2/ConstBody.java new file mode 100644 index 00000000..3fad860c --- /dev/null +++ b/src/test/test2/ConstBody.java @@ -0,0 +1,22 @@ +package test2; + +class ConstBody2 { + int value; + ConstBody2() { + value = 1; + } + + ConstBody2(String s, Integer i) { + value = 2; + } +} + +public class ConstBody extends ConstBody2 { + public ConstBody() { + super(); + } + + public int bar() { + return value; + } +} diff --git a/src/test/test2/ConstField.class b/src/test/test2/ConstField.class Binary files differnew file mode 100644 index 00000000..5f7a4d8b --- /dev/null +++ b/src/test/test2/ConstField.class diff --git a/src/test/test2/ConstField.java b/src/test/test2/ConstField.java new file mode 100644 index 00000000..d733b4f6 --- /dev/null +++ b/src/test/test2/ConstField.java @@ -0,0 +1,13 @@ +package test2;
+
+public class ConstField {
+ public static final boolean b = true;
+ public static final int i = 3;
+ public static final long j = 7L;
+ public static final float f = 8.0F;
+ public static final double d = 9.0;
+ public static final String s = "const";
+ public static final Object obj = null;
+ public static final Integer integer = new Integer(4);
+ public static int k = 2;
+}
diff --git a/src/test/test2/Construct.java b/src/test/test2/Construct.java new file mode 100644 index 00000000..250a55c2 --- /dev/null +++ b/src/test/test2/Construct.java @@ -0,0 +1,7 @@ +package test2;
+
+public class Construct {
+ public Construct(int i) {}
+ public Construct() {}
+ static int i = 3;
+}
diff --git a/src/test/test2/DotClass.class b/src/test/test2/DotClass.class Binary files differnew file mode 100644 index 00000000..6cc7a6bd --- /dev/null +++ b/src/test/test2/DotClass.class diff --git a/src/test/test2/DotClass2.class b/src/test/test2/DotClass2.class Binary files differnew file mode 100644 index 00000000..aa67fb10 --- /dev/null +++ b/src/test/test2/DotClass2.class diff --git a/src/test/test2/DotClass4.class b/src/test/test2/DotClass4.class Binary files differnew file mode 100644 index 00000000..48e51b7e --- /dev/null +++ b/src/test/test2/DotClass4.class diff --git a/src/test/test2/Finally.class b/src/test/test2/Finally.class Binary files differnew file mode 100644 index 00000000..f680dbc3 --- /dev/null +++ b/src/test/test2/Finally.class diff --git a/src/test/test2/Finally.java b/src/test/test2/Finally.java new file mode 100644 index 00000000..1da85725 --- /dev/null +++ b/src/test/test2/Finally.java @@ -0,0 +1,12 @@ +package test2;
+
+public class Finally {
+ int a = 0;
+ String s = null;
+ double b = 1.0;
+
+ public void update() {
+ a = s.length();
+ b++;
+ }
+}
diff --git a/src/test/test2/Imported.class b/src/test/test2/Imported.class Binary files differnew file mode 100644 index 00000000..3ae65fdd --- /dev/null +++ b/src/test/test2/Imported.class diff --git a/src/test/test2/Importer.class b/src/test/test2/Importer.class Binary files differnew file mode 100644 index 00000000..24da5de9 --- /dev/null +++ b/src/test/test2/Importer.class diff --git a/src/test/test2/IncOp.class b/src/test/test2/IncOp.class Binary files differnew file mode 100644 index 00000000..f75a9eb1 --- /dev/null +++ b/src/test/test2/IncOp.class diff --git a/src/test/test2/Inherit.class b/src/test/test2/Inherit.class Binary files differnew file mode 100644 index 00000000..ef886ce1 --- /dev/null +++ b/src/test/test2/Inherit.class diff --git a/src/test/test2/Inherit.java b/src/test/test2/Inherit.java new file mode 100644 index 00000000..b310730b --- /dev/null +++ b/src/test/test2/Inherit.java @@ -0,0 +1,26 @@ +package test2; + +interface Inherit1 { + void foo1(); +} + +interface Inherit2 extends Inherit1 { + void foo2(); +} + +abstract class Inherit3 implements Inherit2 { + abstract void foo3(); +} + +public class Inherit extends Inherit3 { + public void foo1() { System.out.println("foo1"); } + public void foo2() { System.out.println("foo2"); } + public void foo3() { System.out.println("foo3"); } + + public static void main(String args[]) { + Inherit i = new Inherit(); + Inherit2 i2 = i; + i.foo2(); + i2.foo1(); + } +} diff --git a/src/test/test2/Inner.class b/src/test/test2/Inner.class Binary files differnew file mode 100644 index 00000000..d7506a62 --- /dev/null +++ b/src/test/test2/Inner.class diff --git a/src/test/test2/Inner.java b/src/test/test2/Inner.java new file mode 100644 index 00000000..dbfb6d6e --- /dev/null +++ b/src/test/test2/Inner.java @@ -0,0 +1,13 @@ +package test2; + +public class Inner { + public void sample() throws Exception { + java.util.Properties props = new java.util.Properties(); + java.rmi.activation.ActivationGroupDesc.CommandEnvironment ace = null; + java.rmi.activation.ActivationGroupDesc agd = new + java.rmi.activation.ActivationGroupDesc(props,ace); + } + public static void main(String args[]) { + System.out.println("Inner"); + } +} diff --git a/src/test/test2/InsertAt.class b/src/test/test2/InsertAt.class Binary files differnew file mode 100644 index 00000000..b8194bae --- /dev/null +++ b/src/test/test2/InsertAt.class diff --git a/src/test/test2/InsertAt.java b/src/test/test2/InsertAt.java new file mode 100644 index 00000000..196028ef --- /dev/null +++ b/src/test/test2/InsertAt.java @@ -0,0 +1,23 @@ +package test2; + +public class InsertAt { + public int counter = 0; + + public int foo() { + for (int i = 0; i < 3; i++) + counter++; + + return counter; + } + + public int bar() { + return bar2(7); + } + + public int bar2(int k) { + int i = 1; + int j = i + 3; + k += i + j; + return k; + } +} diff --git a/src/test/test2/InsertLocal.class b/src/test/test2/InsertLocal.class Binary files differnew file mode 100644 index 00000000..d0f32f27 --- /dev/null +++ b/src/test/test2/InsertLocal.class diff --git a/src/test/test2/InsertLocal.java b/src/test/test2/InsertLocal.java new file mode 100644 index 00000000..d400e622 --- /dev/null +++ b/src/test/test2/InsertLocal.java @@ -0,0 +1,32 @@ +package test2; + +public class InsertLocal { + public int run() { + return (int)(foo(4, 3.14, "pai") * 100) + field; + } + + private int field = 0; + + public double foo(int i, double d, String s) { + int k; + + for (k = 0; k < i; k++) + d++; + + return d; + } + + public int run2() { + String s = "."; + int k = 0; + return k + s.length(); + } + + public int run3() { + int i = 0; + int j = field; + int k = run2(); + InsertLocal obj = new InsertLocal(); + return i; + } +} diff --git a/src/test/test2/LocalVar.class b/src/test/test2/LocalVar.class Binary files differnew file mode 100644 index 00000000..a1d93574 --- /dev/null +++ b/src/test/test2/LocalVar.class diff --git a/src/test/test2/LocalVar.java b/src/test/test2/LocalVar.java new file mode 100644 index 00000000..0ba740be --- /dev/null +++ b/src/test/test2/LocalVar.java @@ -0,0 +1,6 @@ +package test2; + +public class LocalVar { + public String toString() { return "123"; } + public int foo() { return toString().length(); } +} diff --git a/src/test/test2/MakeStaticMethod.class b/src/test/test2/MakeStaticMethod.class Binary files differnew file mode 100644 index 00000000..320f0f3a --- /dev/null +++ b/src/test/test2/MakeStaticMethod.class diff --git a/src/test/test2/MethodCall.class b/src/test/test2/MethodCall.class Binary files differnew file mode 100644 index 00000000..6b8fc153 --- /dev/null +++ b/src/test/test2/MethodCall.class diff --git a/src/test/test2/MethodCall.java b/src/test/test2/MethodCall.java new file mode 100644 index 00000000..22341a08 --- /dev/null +++ b/src/test/test2/MethodCall.java @@ -0,0 +1,8 @@ +package test2;
+
+public class MethodCall {
+ public Object bar() {
+ String[] str = new String[] { "one", "two" };
+ return str.clone();
+ }
+}
diff --git a/src/test/test2/Nested$Inner3.class b/src/test/test2/Nested$Inner3.class Binary files differnew file mode 100644 index 00000000..21afc9a0 --- /dev/null +++ b/src/test/test2/Nested$Inner3.class diff --git a/src/test/test2/Nested.class b/src/test/test2/Nested.class Binary files differnew file mode 100644 index 00000000..529317ae --- /dev/null +++ b/src/test/test2/Nested.class diff --git a/src/test/test2/Nested.java b/src/test/test2/Nested.java new file mode 100644 index 00000000..70ce60ee --- /dev/null +++ b/src/test/test2/Nested.java @@ -0,0 +1,22 @@ +package test2;
+
+public class Nested {
+ private int i = 3;
+ private int geti() { return i; }
+ private static int getj(int k) { return k; }
+ public void seti(int i) { this.i = i; }
+
+ public class Inner {
+ public int geti() { return i; }
+ public void foo(Inner2 in) {}
+ }
+
+ public class Inner2 {
+ public int geti() { return i; }
+ }
+
+ public static class Inner3 {
+ public int f() { return 1; }
+ public static int g() { return 1; }
+ }
+}
diff --git a/src/test/test2/Nested2$Inner.class b/src/test/test2/Nested2$Inner.class Binary files differnew file mode 100644 index 00000000..0267e5e5 --- /dev/null +++ b/src/test/test2/Nested2$Inner.class diff --git a/src/test/test2/Nested2.class b/src/test/test2/Nested2.class Binary files differnew file mode 100644 index 00000000..7cb3b346 --- /dev/null +++ b/src/test/test2/Nested2.class diff --git a/src/test/test2/Nested2.java b/src/test/test2/Nested2.java new file mode 100644 index 00000000..f23439bd --- /dev/null +++ b/src/test/test2/Nested2.java @@ -0,0 +1,15 @@ +package test2;
+
+public class Nested2 {
+ private int i = 3;
+ private double d = 3.0;
+ private String s = "OK";
+ private int geti() { return i; }
+ private static int getj(int k) { return k; }
+ public void seti(int i) { this.i = i; }
+
+ public static class Inner {
+ public int f() { return 1; }
+ public static int g() { return 1; }
+ }
+}
diff --git a/src/test/test2/Nested3$Inner.class b/src/test/test2/Nested3$Inner.class Binary files differnew file mode 100644 index 00000000..dbc70b60 --- /dev/null +++ b/src/test/test2/Nested3$Inner.class diff --git a/src/test/test2/Nested3.class b/src/test/test2/Nested3.class Binary files differnew file mode 100644 index 00000000..a1e2a736 --- /dev/null +++ b/src/test/test2/Nested3.class diff --git a/src/test/test2/Nested3.java b/src/test/test2/Nested3.java new file mode 100644 index 00000000..570f7a5e --- /dev/null +++ b/src/test/test2/Nested3.java @@ -0,0 +1,16 @@ +package test2;
+
+public class Nested3 {
+ private int i = 0;
+ private int geti() { return i; }
+
+ Nested3(int j) { i = 1; }
+
+ private Nested3() { i = 2; }
+
+ private Nested3(String s) { i = 3; }
+
+ public static class Inner {
+ public int g() { return 1; }
+ }
+}
diff --git a/src/test/test2/Nested4$Inner.class b/src/test/test2/Nested4$Inner.class Binary files differnew file mode 100644 index 00000000..b770ef79 --- /dev/null +++ b/src/test/test2/Nested4$Inner.class diff --git a/src/test/test2/Nested4.class b/src/test/test2/Nested4.class Binary files differnew file mode 100644 index 00000000..550fb403 --- /dev/null +++ b/src/test/test2/Nested4.class diff --git a/src/test/test2/Nested4.java b/src/test/test2/Nested4.java new file mode 100644 index 00000000..5b33aea5 --- /dev/null +++ b/src/test/test2/Nested4.java @@ -0,0 +1,5 @@ +package test2;
+
+public class Nested4 {
+ private static int value = 6;
+}
diff --git a/src/test/test2/NewArray.class b/src/test/test2/NewArray.class Binary files differnew file mode 100644 index 00000000..9dfbbe63 --- /dev/null +++ b/src/test/test2/NewArray.class diff --git a/src/test/test2/NewArray.java b/src/test/test2/NewArray.java new file mode 100644 index 00000000..d61fa750 --- /dev/null +++ b/src/test/test2/NewArray.java @@ -0,0 +1,18 @@ +package test2;
+
+public class NewArray {
+ public int run() {
+ return foo(1);
+ }
+
+ public int foo(int i) {
+ String[] s1 = new String[3];
+ String[][] s2 = new String[4][];
+ String[][] s3 = new String[5][6];
+ int[] i1 = new int[7];
+ int[][] i2 = new int[8][];
+ int[][] i3 = new int[9][10];
+ int[][][] i4 = new int[11][12][];
+ return i;
+ }
+}
diff --git a/src/test/test2/NewExprInTry.class b/src/test/test2/NewExprInTry.class Binary files differnew file mode 100644 index 00000000..79ca894a --- /dev/null +++ b/src/test/test2/NewExprInTry.class diff --git a/src/test/test2/NewExprInTry.java b/src/test/test2/NewExprInTry.java new file mode 100644 index 00000000..e6e1fe90 --- /dev/null +++ b/src/test/test2/NewExprInTry.java @@ -0,0 +1,24 @@ +package test2;
+
+import java.util.HashMap;
+
+class HashMapWrapper extends HashMap {
+ HashMapWrapper(int size, int args) {
+ super(size);
+ }
+}
+
+public class NewExprInTry {
+ public int run() {
+ return foo(6);
+ }
+
+ public int foo(int size) {
+ HashMap h;
+ try {
+ h = new HashMap(size);
+ }
+ catch (Exception e) {}
+ return 1;
+ }
+}
diff --git a/src/test/test2/NewExprTry.class b/src/test/test2/NewExprTry.class Binary files differnew file mode 100644 index 00000000..f70141e6 --- /dev/null +++ b/src/test/test2/NewExprTry.class diff --git a/src/test/test2/NewExprTry.java b/src/test/test2/NewExprTry.java new file mode 100644 index 00000000..fb779d96 --- /dev/null +++ b/src/test/test2/NewExprTry.java @@ -0,0 +1,20 @@ +package test2;
+
+public class NewExprTry {
+ public NewExprTry() { this(3); }
+
+ public NewExprTry(int i) {}
+
+ public int run() {
+ return foo(3).getClass().getName().length();
+ }
+
+ public Object foo(int i) {
+ NewExprTry obj = new NewExprTry(i);
+ return obj;
+ }
+
+ public static void main(String[] args) {
+ NewExprTry obj = new NewExprTry(3);
+ }
+}
diff --git a/src/test/test2/NewOp.class b/src/test/test2/NewOp.class Binary files differnew file mode 100644 index 00000000..da62b7c3 --- /dev/null +++ b/src/test/test2/NewOp.class diff --git a/src/test/test2/NewOp.java b/src/test/test2/NewOp.java new file mode 100644 index 00000000..bf798a92 --- /dev/null +++ b/src/test/test2/NewOp.java @@ -0,0 +1,15 @@ +package test2;
+
+class NewOp2 {
+ NewOp2(long j, NewOp op, Object obj, long k) {}
+}
+
+public class NewOp {
+ java.util.Vector listenerList;
+ static int i = 0;
+ static String s;
+ static {
+ String m = "test";
+ s = m.substring(1);
+ }
+}
diff --git a/src/test/test2/NullArgTest.class b/src/test/test2/NullArgTest.class Binary files differnew file mode 100644 index 00000000..79dd7195 --- /dev/null +++ b/src/test/test2/NullArgTest.class diff --git a/src/test/test2/PrivateMethod.java b/src/test/test2/PrivateMethod.java new file mode 100644 index 00000000..51ed75f7 --- /dev/null +++ b/src/test/test2/PrivateMethod.java @@ -0,0 +1,11 @@ +package test2;
+
+class PrivateMethod2 {
+ private int f() { return 0; }
+
+ int g() { return f(); }
+}
+
+public class PrivateMethod {
+ public int i;
+}
diff --git a/src/test/test2/Prune.java b/src/test/test2/Prune.java new file mode 100644 index 00000000..1daf9cbb --- /dev/null +++ b/src/test/test2/Prune.java @@ -0,0 +1,15 @@ +package test2;
+
+public class Prune extends java.awt.Point implements Cloneable, Runnable {
+ public int value;
+
+ public Prune(int i) {
+ value = i;
+ }
+
+ public void run() {}
+
+ public int sum() {
+ return x + y;
+ }
+}
diff --git a/src/test/test2/Remove.class b/src/test/test2/Remove.class Binary files differnew file mode 100644 index 00000000..d2bab30b --- /dev/null +++ b/src/test/test2/Remove.class diff --git a/src/test/test2/Remove.java b/src/test/test2/Remove.java new file mode 100644 index 00000000..3f980f6a --- /dev/null +++ b/src/test/test2/Remove.java @@ -0,0 +1,25 @@ +package test2; + +class RemoveParent { + int p; +} + +public class Remove extends RemoveParent { + public int f1; + public int f2; + public String f3; + public Remove f4; + public int[] f5; + public int f6; + int g = 3; + + public void bar() {} + public Remove() { g = 7; } + public Remove(int i) { g = i; } + + public int foo() { + return g; + } + + public void bar2() {} +} diff --git a/src/test/test2/RemoveCall.class b/src/test/test2/RemoveCall.class Binary files differnew file mode 100644 index 00000000..1b818395 --- /dev/null +++ b/src/test/test2/RemoveCall.class diff --git a/src/test/test2/RemoveCall.java b/src/test/test2/RemoveCall.java new file mode 100644 index 00000000..909ef377 --- /dev/null +++ b/src/test/test2/RemoveCall.java @@ -0,0 +1,13 @@ +package test2;
+
+public class RemoveCall {
+ int k = 0;
+ public int bar() throws Exception {
+ foo(3);
+ return k;
+ }
+
+ public void foo(int k) throws Exception {
+ k = 1;
+ }
+}
diff --git a/src/test/test2/ReplaceClassName.class b/src/test/test2/ReplaceClassName.class Binary files differnew file mode 100644 index 00000000..db3611b3 --- /dev/null +++ b/src/test/test2/ReplaceClassName.class diff --git a/src/test/test2/ReplaceClassName.java b/src/test/test2/ReplaceClassName.java new file mode 100644 index 00000000..b41d9db0 --- /dev/null +++ b/src/test/test2/ReplaceClassName.java @@ -0,0 +1,18 @@ +package test2;
+
+class ReplaceClassName2 {
+}
+
+class ReplaceClassName3 {
+}
+
+public class ReplaceClassName {
+ ReplaceClassName2 field;
+ public ReplaceClassName(ReplaceClassName2 a) {
+ field = a;
+ }
+
+ public void foo(ReplaceClassName2 a) {
+ field = a;
+ }
+}
diff --git a/src/test/test2/SetExceptions.class b/src/test/test2/SetExceptions.class Binary files differnew file mode 100644 index 00000000..2331eb9c --- /dev/null +++ b/src/test/test2/SetExceptions.class diff --git a/src/test/test2/SetExceptions.java b/src/test/test2/SetExceptions.java new file mode 100644 index 00000000..fd3f2322 --- /dev/null +++ b/src/test/test2/SetExceptions.java @@ -0,0 +1,7 @@ +package test2;
+
+public class SetExceptions {
+ public void f() throws Exception {
+ throw new Exception();
+ }
+}
diff --git a/src/test/test2/SetSuper.class b/src/test/test2/SetSuper.class Binary files differnew file mode 100644 index 00000000..55861734 --- /dev/null +++ b/src/test/test2/SetSuper.class diff --git a/src/test/test2/SetSuperIntf.class b/src/test/test2/SetSuperIntf.class Binary files differnew file mode 100644 index 00000000..d5595567 --- /dev/null +++ b/src/test/test2/SetSuperIntf.class diff --git a/src/test/test2/SetSuperParent.class b/src/test/test2/SetSuperParent.class Binary files differnew file mode 100644 index 00000000..2825d7d7 --- /dev/null +++ b/src/test/test2/SetSuperParent.class diff --git a/src/test/test2/StaticArraysMem.java b/src/test/test2/StaticArraysMem.java new file mode 100644 index 00000000..5c220a0e --- /dev/null +++ b/src/test/test2/StaticArraysMem.java @@ -0,0 +1,5 @@ +package test2; + +public class StaticArraysMem { + int i; +} diff --git a/src/test/test2/StaticFinal.class b/src/test/test2/StaticFinal.class Binary files differnew file mode 100644 index 00000000..69be9939 --- /dev/null +++ b/src/test/test2/StaticFinal.class diff --git a/src/test/test2/StaticMember.class b/src/test/test2/StaticMember.class Binary files differnew file mode 100644 index 00000000..10a72092 --- /dev/null +++ b/src/test/test2/StaticMember.class diff --git a/src/test/test2/StaticMember.java b/src/test/test2/StaticMember.java new file mode 100644 index 00000000..10c14bda --- /dev/null +++ b/src/test/test2/StaticMember.java @@ -0,0 +1,11 @@ +package test2;
+
+interface IStaticMember {
+ int bar();
+}
+
+public class StaticMember implements IStaticMember {
+ public static int k = 3;
+ public static int foo() { return 7; }
+ public int bar() { return 3; }
+}
diff --git a/src/test/test2/StaticMember2.class b/src/test/test2/StaticMember2.class Binary files differnew file mode 100644 index 00000000..fe46c673 --- /dev/null +++ b/src/test/test2/StaticMember2.class diff --git a/src/test/test2/StaticMember2.java b/src/test/test2/StaticMember2.java new file mode 100644 index 00000000..747bb9b6 --- /dev/null +++ b/src/test/test2/StaticMember2.java @@ -0,0 +1,12 @@ +package test2;
+
+public class StaticMember2 {
+ public static final int f = 11;
+ public static final long fj = 13L;
+ public static final boolean fb = false;
+ public static final double fd = 23.7;
+
+ public static int k = 3;
+ public static int seven() { return 7; }
+ public int bar() { return 3; }
+}
diff --git a/src/test/test2/SuperCall.class b/src/test/test2/SuperCall.class Binary files differnew file mode 100644 index 00000000..b7294c22 --- /dev/null +++ b/src/test/test2/SuperCall.class diff --git a/src/test/test2/SuperCall.java b/src/test/test2/SuperCall.java new file mode 100644 index 00000000..f1c42027 --- /dev/null +++ b/src/test/test2/SuperCall.java @@ -0,0 +1,20 @@ +package test2; + +class SuperClass { + public void foo() throws Exception {} +} + +public class SuperCall extends SuperClass { + int i = 0; + public int bar() throws Exception { + foo(); + return 1; + } + + public void foo() throws Exception { + if (++i > 5) + throw new Exception("infinite regression?"); + + super.foo(); + } +} diff --git a/src/test/test2/SuperInterface1.java b/src/test/test2/SuperInterface1.java new file mode 100644 index 00000000..4bb6c49a --- /dev/null +++ b/src/test/test2/SuperInterface1.java @@ -0,0 +1,6 @@ +package test2;
+
+public interface SuperInterface1 {
+ public int getAge();
+ public int setAge(int value);
+}
diff --git a/src/test/test2/SuperInterface2.java b/src/test/test2/SuperInterface2.java new file mode 100644 index 00000000..27d5925a --- /dev/null +++ b/src/test/test2/SuperInterface2.java @@ -0,0 +1,3 @@ +package test2;
+
+public interface SuperInterface2 extends SuperInterface1 {}
diff --git a/src/test/test2/SuperInterface3.class b/src/test/test2/SuperInterface3.class Binary files differnew file mode 100644 index 00000000..4b6c7b73 --- /dev/null +++ b/src/test/test2/SuperInterface3.class diff --git a/src/test/test2/Switch.class b/src/test/test2/Switch.class Binary files differnew file mode 100644 index 00000000..78e8ea94 --- /dev/null +++ b/src/test/test2/Switch.class diff --git a/src/test/test2/Synch.class b/src/test/test2/Synch.class Binary files differnew file mode 100644 index 00000000..c5a5ddd1 --- /dev/null +++ b/src/test/test2/Synch.class diff --git a/src/test/test2/Where.java b/src/test/test2/Where.java new file mode 100644 index 00000000..29907f81 --- /dev/null +++ b/src/test/test2/Where.java @@ -0,0 +1,10 @@ +package test2;
+
+public class Where {
+ static int i = 0;
+ static String s;
+ static {
+ String m = "test";
+ s = m.substring(1);
+ }
+}
|