renamed all modules

This commit is contained in:
Andy Clement
2014-01-15 11:36:24 -08:00
parent 342420b2ed
commit ceef61cf98
1055 changed files with 301 additions and 259 deletions

14
testdata/src/main/java/ctors/A.java vendored Normal file
View File

@@ -0,0 +1,14 @@
package ctors;
public class A {
String string;
A(String s) {
this.string = s;
}
public String getString() {
return string;
}
}

7
testdata/src/main/java/ctors/B.java vendored Normal file
View File

@@ -0,0 +1,7 @@
package ctors;
public class B extends A {
B(int i) {
super(new Integer(i).toString());
}
}

7
testdata/src/main/java/ctors/B2.java vendored Normal file
View File

@@ -0,0 +1,7 @@
package ctors;
public class B2 extends A {
B2(int i) {
super("27");
}
}

View File

@@ -0,0 +1,13 @@
package ctors;
public class Callee {
Callee() {
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,17 @@
package ctors;
public class Callee2 {
Callee2() {
}
Callee2(String theString) {
System.out.println(theString);
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,13 @@
package ctors;
public class CalleeB extends CalleeSuperB {
CalleeB() {
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,18 @@
package ctors;
public class CalleeB2 extends CalleeSuperB2 {
CalleeB2() {
}
CalleeB2(String theString) {
super(32768);
System.out.println(theString);
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,13 @@
package ctors;
public class CalleeSuperB {
CalleeSuperB() {
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,17 @@
package ctors;
public class CalleeSuperB2 {
CalleeSuperB2() {
}
CalleeSuperB2(int i) {
System.out.println("Super number was " + i);
}
public String toString() {
return "callee";
}
}

View File

@@ -0,0 +1,13 @@
package ctors;
public class Caller {
public Object runA() {
return new Callee();
}
public Object runB() {
// ... stubbed here ...
return null;
}
}

View File

@@ -0,0 +1,12 @@
package ctors;
public class Caller2 {
public Object runA() {
return new Callee();
}
public Object runB() {
return new Callee2("abcde");
}
}

View File

@@ -0,0 +1,13 @@
package ctors;
public class CallerB {
public Object runA() {
return new CalleeB();
}
public Object runB() {
// ... stubbed here ...
return null;
}
}

View File

@@ -0,0 +1,12 @@
package ctors;
public class CallerB2 {
public Object runA() {
return new CalleeB();
}
public Object runB() {
return new CalleeB2("abcde");
}
}

View File

@@ -0,0 +1,4 @@
package ctors;
public class Default {
}

View File

@@ -0,0 +1,16 @@
package ctors;
public class Finals {
public final int i = 324;
public static final String s = "abc";
public Finals() {
}
public String getValue() {
return i + " " + s;
}
}

View File

@@ -0,0 +1,16 @@
package ctors;
public class Finals2 {
public final int i = 324;
public static final String s = "def";
public Finals2() {
}
public String getValue() {
return i + " " + s;
}
}

23
testdata/src/main/java/ctors/JR.java vendored Normal file
View File

@@ -0,0 +1,23 @@
package ctors;
public class JR {
public JR(int i) {
}
public static String printMessage() {
return "hello";
}
public static JR getInstance() {
return new JR(42);
}
public Object getFieldReflectively() throws Exception {
return null;
}
public void setFieldReflectively(int value) throws Exception {
}
}

36
testdata/src/main/java/ctors/JR2.java vendored Normal file
View File

@@ -0,0 +1,36 @@
package ctors;
import java.lang.reflect.Field;
public class JR2 {
int field = 34;
public JR2(int i) {
}
public JR2() {
}
public static String printMessage() {
return "goodbye";
}
public static JR2 getInstance() {
return new JR2();
}
public Object getFieldReflectively() throws Exception {
Field f = this.getClass().getDeclaredField("field");
return f.get(this);
}
public void setFieldReflectively(int value) throws Exception {
Field f = this.getClass().getDeclaredField("field");
f.setAccessible(true);
f.set(this,value);
}
}

7
testdata/src/main/java/ctors/One.java vendored Normal file
View File

@@ -0,0 +1,7 @@
package ctors;
public class One {
public One() {
System.out.println("Hello Andy");
}
}

View File

@@ -0,0 +1,7 @@
package ctors;
public class One2 {
public One2() {
System.out.println("Hello World");
}
}

View File

@@ -0,0 +1,26 @@
package ctors;
public class Setter {
public int integer;
public String string;
public Setter setter;
Setter() {
integer = 1;
string = "one";
}
public String toString() {
return "instance of Setter";
}
public int getInteger() {
return integer;
}
public String getString() {
return string;
}
}

View File

@@ -0,0 +1,25 @@
package ctors;
public class Setter2 {
public int integer;
public String string;
Setter2() {
integer = 2;
string = "two";
}
public String toString() {
return "instance of Setter";
}
public int getInteger() {
return integer;
}
public String getString() {
return string;
}
}

View File

@@ -0,0 +1,24 @@
package ctors;
public class Setter3 {
public int integer;
public String string;
Setter3() {
integer = 3;
}
public String toString() {
return "instance of Setter";
}
public int getInteger() {
return integer;
}
public String getString() {
return string;
}
}

View File

@@ -0,0 +1,8 @@
package ctors;
public class SuperThree {
SuperThree() {
System.err.print("Hello from SuperThree.");
}
}

View File

@@ -0,0 +1,8 @@
package ctors;
public class SuperThree2 {
SuperThree2() {
System.err.print("Hello from SuperThree2.");
}
}

View File

@@ -0,0 +1,8 @@
package ctors;
public class Three extends SuperThree {
Three() {
System.err.println("Hello from Three.");
}
}

View File

@@ -0,0 +1,8 @@
package ctors;
public class Three2 extends SuperThree {
Three2() {
System.err.println("Hello from Three2.");
}
}

BIN
testdata/src/main/java/ctors/Two.class vendored Normal file

Binary file not shown.

6
testdata/src/main/java/ctors/Two.java vendored Normal file
View File

@@ -0,0 +1,6 @@
package ctors;
public class Two {
Two(String message) {
System.out.println(message);
}
}

View File

@@ -0,0 +1,6 @@
package ctors;
public class Two2 {
Two2(String message) {
System.out.println(message+message);
}
}

16
testdata/src/main/java/ctors/Utils.java vendored Normal file
View File

@@ -0,0 +1,16 @@
package ctors;
public class Utils {
public static String stack(int n) {
StringBuilder s = new StringBuilder();
StackTraceElement[] ste = Thread.currentThread().getStackTrace();
// Skip the currentThread() entry and this stack() entry
if (ste[1].toString().indexOf("stack(") == -1) {
throw new IllegalStateException("Assumed stack was entry 2");
}
s.append(ste[2]).append("\n");
return s.toString();
}
}

15
testdata/src/main/java/ctors/V.java vendored Normal file
View File

@@ -0,0 +1,15 @@
package ctors;
public class V {
int i = 1;
int j = 2;
public V() {
printMessage();
}
public static void printMessage() {
System.out.println("Hello");
}
}

15
testdata/src/main/java/ctors/V2.java vendored Normal file
View File

@@ -0,0 +1,15 @@
package ctors;
public class V2 {
int i = 1;
int j = 2;
public V2() {
printMessage();
}
public static void printMessage() {
System.out.println("Hello");
}
}

15
testdata/src/main/java/ctors/V3.java vendored Normal file
View File

@@ -0,0 +1,15 @@
package ctors;
public class V3 {
int i = 1;
int j = 4; // changed in this version
public V3() {
printMessage();
}
public static void printMessage() {
System.out.println("Goodbye");
}
}

8
testdata/src/main/java/ctors/XX.java vendored Normal file
View File

@@ -0,0 +1,8 @@
package ctors;
public class XX {
public XX() {
System.out.println(Utils.stack(2));
}
}

9
testdata/src/main/java/ctors/XX2.java vendored Normal file
View File

@@ -0,0 +1,9 @@
package ctors;
public class XX2 {
public XX2() {
System.err.println("sometext");
System.out.println(Utils.stack(2));
}
}