renamed all modules
This commit is contained in:
13
testdata/src/main/java/data/AnAspect.java
vendored
Normal file
13
testdata/src/main/java/data/AnAspect.java
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
package data;
|
||||
|
||||
public aspect AnAspect {
|
||||
|
||||
before(): execution(!static * AspectReceiver.*(..)) {
|
||||
System.out.println("Foo");
|
||||
}
|
||||
|
||||
pointcut boo(String foo,String bar): execution(* *(..)) && args(foo,bar);
|
||||
before(String foo): boo(foo,*) {
|
||||
|
||||
}
|
||||
}
|
||||
5
testdata/src/main/java/data/Anno.java
vendored
Normal file
5
testdata/src/main/java/data/Anno.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package data;
|
||||
|
||||
public @interface Anno {
|
||||
|
||||
}
|
||||
10
testdata/src/main/java/data/AnnotatedClazz.java
vendored
Normal file
10
testdata/src/main/java/data/AnnotatedClazz.java
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package data;
|
||||
|
||||
@Anno
|
||||
public class AnnotatedClazz {
|
||||
|
||||
@Anno
|
||||
public void moo() {
|
||||
|
||||
}
|
||||
}
|
||||
20
testdata/src/main/java/data/Apple.java
vendored
Normal file
20
testdata/src/main/java/data/Apple.java
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package data;
|
||||
|
||||
public class Apple {
|
||||
|
||||
public int intField;
|
||||
public static int staticIntField;
|
||||
|
||||
public void run() {
|
||||
System.out.println("Apple.run() is running ");
|
||||
}
|
||||
|
||||
public String runWithReturn() {
|
||||
return "alphabeti spaghetti";
|
||||
}
|
||||
|
||||
public void runWithParam(String string) {
|
||||
System.out.println("Apple.run(" + string + ") is running ");
|
||||
}
|
||||
|
||||
}
|
||||
67
testdata/src/main/java/data/Apple002.java
vendored
Normal file
67
testdata/src/main/java/data/Apple002.java
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
package data;
|
||||
|
||||
public class Apple002 {
|
||||
|
||||
public int intField;
|
||||
public static int staticIntField;
|
||||
|
||||
public void run() {
|
||||
System.out.println("Apple002.run() is running ");
|
||||
}
|
||||
|
||||
public String run(String a, Integer b, String c, Integer d) {
|
||||
return a + " " + b + " " + c + " " + d;
|
||||
}
|
||||
|
||||
public String run2(int i) {
|
||||
return "run2 " + i;
|
||||
}
|
||||
|
||||
public int run3(int i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
public static int run4(int i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
public Boolean runGetBoolean(boolean i) {
|
||||
return !i;
|
||||
}
|
||||
|
||||
public short runGetShort(short i) {
|
||||
return (short) (i * 2);
|
||||
}
|
||||
|
||||
public float runGetFloat(float i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
public long runGetLong(long i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
public double runGetDouble(double i) {
|
||||
return i * 2;
|
||||
}
|
||||
|
||||
public char runGetChar(char i) {
|
||||
return (char) (i + 1);
|
||||
}
|
||||
|
||||
public byte runGetByte(byte i) {
|
||||
return (byte) (i * 2);
|
||||
}
|
||||
|
||||
public int[] runGetArrayInt(int[] is) {
|
||||
return is;
|
||||
}
|
||||
|
||||
public String[] runGetArrayString(String[] is) {
|
||||
return is;
|
||||
}
|
||||
|
||||
public String run(String s, int i, double d, String t, int[] is) {
|
||||
return s + i + d + t + is[0];
|
||||
}
|
||||
}
|
||||
9
testdata/src/main/java/data/Apple003.java
vendored
Normal file
9
testdata/src/main/java/data/Apple003.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package data;
|
||||
|
||||
public class Apple003 {
|
||||
|
||||
public void run() {
|
||||
System.out.println("Apple003.run() is running");
|
||||
}
|
||||
|
||||
}
|
||||
15
testdata/src/main/java/data/AspectReceiver.java
vendored
Normal file
15
testdata/src/main/java/data/AspectReceiver.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package data;
|
||||
|
||||
public class AspectReceiver {
|
||||
|
||||
public static void main2() {
|
||||
main(null);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new AspectReceiver().foo();
|
||||
}
|
||||
|
||||
public void foo() {
|
||||
}
|
||||
}
|
||||
23
testdata/src/main/java/data/Banana.java
vendored
Normal file
23
testdata/src/main/java/data/Banana.java
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
package data;
|
||||
|
||||
public class Banana {
|
||||
|
||||
Pear p = new Pear();
|
||||
|
||||
public int[] getIntArrayField() {
|
||||
return p.intArray;
|
||||
}
|
||||
|
||||
public void setIntArrayField(int[] is) {
|
||||
p.intArray = is;
|
||||
}
|
||||
|
||||
public static int[] getStaticIntArrayField() {
|
||||
return Pear.staticIntArray;
|
||||
}
|
||||
|
||||
public static void setStaticIntArrayField(int[] is) {
|
||||
Pear.staticIntArray = is;
|
||||
}
|
||||
|
||||
}
|
||||
12
testdata/src/main/java/data/BottomType.java
vendored
Normal file
12
testdata/src/main/java/data/BottomType.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
public class BottomType {
|
||||
|
||||
public int methodOne(String[] ss) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public String methodTwo(int i) {
|
||||
return "bottom";
|
||||
}
|
||||
}
|
||||
26
testdata/src/main/java/data/ComplexClass.java
vendored
Normal file
26
testdata/src/main/java/data/ComplexClass.java
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings({ "unused", "serial" })
|
||||
class ComplexClass extends SimpleClass implements java.io.Serializable {
|
||||
private int privateField;
|
||||
public String publicField;
|
||||
List<String> defaultField;
|
||||
|
||||
private int privateMethod() {
|
||||
return privateField;
|
||||
}
|
||||
|
||||
public String publicMethod() {
|
||||
return publicField;
|
||||
}
|
||||
|
||||
List<String> defaultMethod() {
|
||||
return defaultField;
|
||||
}
|
||||
|
||||
void thrower() throws Exception, IllegalStateException {
|
||||
|
||||
}
|
||||
}
|
||||
28
testdata/src/main/java/data/DemoMethods.java
vendored
Normal file
28
testdata/src/main/java/data/DemoMethods.java
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package data;
|
||||
|
||||
public class DemoMethods {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
print("Hello World");
|
||||
}
|
||||
|
||||
public static void print(String message) {
|
||||
System.out.println(upperize(message));
|
||||
}
|
||||
|
||||
private static String upperize(String message) {
|
||||
return message.toUpperCase();
|
||||
}
|
||||
|
||||
}
|
||||
45
testdata/src/main/java/data/DemoMethods2.java
vendored
Normal file
45
testdata/src/main/java/data/DemoMethods2.java
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
package data;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class DemoMethods2 {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
getDeclaredMethod("foo");
|
||||
getDeclaredMethod("foo");
|
||||
getDeclaredMethod("foo");
|
||||
getDeclaredMethod("foo");
|
||||
System.out.println(getFirstDeclaredAnnotation("foo"));
|
||||
System.out.println(getFirstDeclaredAnnotation("foo"));
|
||||
System.out.println(getFirstDeclaredAnnotation("foo"));
|
||||
System.out.println(getFirstDeclaredAnnotation("foo"));
|
||||
System.out.println(getFirstDeclaredAnnotation("foo"));
|
||||
}
|
||||
|
||||
@Wiggle("asc")
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
|
||||
public static Method getDeclaredMethod(String name) {
|
||||
try {
|
||||
Method m = DemoMethods2.class.getDeclaredMethod(name);
|
||||
System.out.println("returning " + m);
|
||||
return m;
|
||||
} catch (NoSuchMethodException nsme) {
|
||||
System.out.println("No such method called foo");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Annotation getFirstDeclaredAnnotation(String name) throws Exception {
|
||||
Annotation[] annos = getDeclaredMethod(name).getDeclaredAnnotations();
|
||||
if (annos == null || annos.length == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return annos[0];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
87
testdata/src/main/java/data/FieldsB.java
vendored
Normal file
87
testdata/src/main/java/data/FieldsB.java
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
package data;
|
||||
|
||||
public class FieldsB {
|
||||
|
||||
int[] is = new int[] { 1, 2, 3 };
|
||||
int i = 23;
|
||||
boolean b = false;
|
||||
char c = 'a';
|
||||
short s = 123;
|
||||
long l = 32768 * 327;
|
||||
double d = 2.0d;
|
||||
float f = 1.4f;
|
||||
String theMessage = "Hello Andy";
|
||||
|
||||
public boolean isB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setB(boolean b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
public int[] getIs() {
|
||||
return is;
|
||||
}
|
||||
|
||||
public void setIs(int[] newis) {
|
||||
is = newis;
|
||||
}
|
||||
|
||||
public char getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setC(char c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public short getS() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setS(short s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
public long getL() {
|
||||
return l;
|
||||
}
|
||||
|
||||
public void setL(long l) {
|
||||
this.l = l;
|
||||
}
|
||||
|
||||
public double getD() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setD(double d) {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
public float getF() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public void setF(float f) {
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
public String getTheMessage() {
|
||||
return theMessage;
|
||||
}
|
||||
|
||||
public void setI(int i) {
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
public int getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setTheMessage(String newValue) {
|
||||
theMessage = newValue;
|
||||
}
|
||||
|
||||
}
|
||||
32
testdata/src/main/java/data/Foo.java
vendored
Normal file
32
testdata/src/main/java/data/Foo.java
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package data;
|
||||
|
||||
|
||||
public class Foo {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
print("Hello");
|
||||
print("World");
|
||||
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i"));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
System.out.println("Annotations: " + Foo.class.getDeclaredField("i").getAnnotation(Wiggle.class));
|
||||
}
|
||||
|
||||
public static void print(String message) {
|
||||
System.out.println();// dosomethingwithit(message));
|
||||
}
|
||||
|
||||
// private static String dosomethingwithit(String message) {
|
||||
// return message.toUpperCase();
|
||||
// }
|
||||
|
||||
@Wiggle
|
||||
int i;
|
||||
}
|
||||
12
testdata/src/main/java/data/Fruity.java
vendored
Normal file
12
testdata/src/main/java/data/Fruity.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
/**
|
||||
* Simple test class with one method returning a String
|
||||
*
|
||||
* @author Andy Clement
|
||||
*/
|
||||
public class Fruity {
|
||||
public String getFruit() {
|
||||
return "apple";
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/Fruity002.java
vendored
Normal file
12
testdata/src/main/java/data/Fruity002.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
/**
|
||||
* Simple test class with one method returning a String
|
||||
*
|
||||
* @author Andy Clement
|
||||
*/
|
||||
public class Fruity002 {
|
||||
public String getFruit() {
|
||||
return "orange";
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/Fruity003.java
vendored
Normal file
12
testdata/src/main/java/data/Fruity003.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
/**
|
||||
* Simple test class with one method returning a String
|
||||
*
|
||||
* @author Andy Clement
|
||||
*/
|
||||
public class Fruity003 {
|
||||
public String getFruit() {
|
||||
return "banana";
|
||||
}
|
||||
}
|
||||
27
testdata/src/main/java/data/HelloWorld.java
vendored
Normal file
27
testdata/src/main/java/data/HelloWorld.java
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorld {
|
||||
public void greet() {
|
||||
System.out.println("Greet from HelloWorld");
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "message from HelloWorld";
|
||||
}
|
||||
|
||||
public String getValueWithParams(String a, String b) {
|
||||
return "message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithParams(String a, String b) {
|
||||
return "static message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
}
|
||||
}
|
||||
28
testdata/src/main/java/data/HelloWorld002.java
vendored
Normal file
28
testdata/src/main/java/data/HelloWorld002.java
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorld002 {
|
||||
public void greet() {
|
||||
System.out.println("Greet from HelloWorld 2");
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "message from HelloWorld002";
|
||||
}
|
||||
|
||||
public String getValueWithParams(String a, String b) {
|
||||
return "message with inserts " + b + " and " + a;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithParams(String a, String b) {
|
||||
return "static message with inserts " + b + " and " + a;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
return "message with inserts " + ch + " and " + i + " and " + a;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
return "message with inserts " + b + " and " + d + " and " + a + " and " + l;
|
||||
}
|
||||
|
||||
}
|
||||
35
testdata/src/main/java/data/HelloWorldClinit.java
vendored
Normal file
35
testdata/src/main/java/data/HelloWorldClinit.java
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldClinit {
|
||||
public void greet() {
|
||||
System.out.println("Greet from HelloWorldClinit");
|
||||
}
|
||||
|
||||
static {
|
||||
int i = 1;
|
||||
int j = 2;
|
||||
for (int k = 0; k < 5; k++) {
|
||||
i += j;
|
||||
}
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "message from HelloWorld";
|
||||
}
|
||||
|
||||
public String getValueWithParams(String a, String b) {
|
||||
return "message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithParams(String a, String b) {
|
||||
return "message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
}
|
||||
}
|
||||
35
testdata/src/main/java/data/HelloWorldClinit002.java
vendored
Normal file
35
testdata/src/main/java/data/HelloWorldClinit002.java
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldClinit002 {
|
||||
public void greet() {
|
||||
System.out.println("Greet from HelloWorldClinit 2");
|
||||
}
|
||||
|
||||
static {
|
||||
int i = 1;
|
||||
int j = 2;
|
||||
for (int k = 0; k < 5; k++) {
|
||||
i += j;
|
||||
}
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "message from HelloWorld";
|
||||
}
|
||||
|
||||
public String getValueWithParams(String a, String b) {
|
||||
return "message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithParams(String a, String b) {
|
||||
return "message with inserts " + a + " and " + b;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
}
|
||||
|
||||
public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
}
|
||||
}
|
||||
15
testdata/src/main/java/data/HelloWorldFields.java
vendored
Normal file
15
testdata/src/main/java/data/HelloWorldFields.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldFields {
|
||||
|
||||
String theMessage = "Hello Andy";
|
||||
|
||||
public void greet() {
|
||||
System.out.println(theMessage);
|
||||
}
|
||||
|
||||
public void setMessage(String newValue) {
|
||||
theMessage = newValue;
|
||||
}
|
||||
|
||||
}
|
||||
34
testdata/src/main/java/data/HelloWorldFields002.java
vendored
Normal file
34
testdata/src/main/java/data/HelloWorldFields002.java
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldFields002 {
|
||||
|
||||
String theMessage = "Hello Christian";
|
||||
|
||||
public void greet() {
|
||||
System.out.println(theMessage);
|
||||
}
|
||||
|
||||
public void setMessage(String newValue) {
|
||||
theMessage = newValue;
|
||||
}
|
||||
|
||||
// public String getValue() {
|
||||
// return "message from HelloWorld";
|
||||
// }
|
||||
//
|
||||
// public String getValueWithParams(String a, String b) {
|
||||
// return "message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithParams(String a, String b) {
|
||||
// return "static message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
// return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
// return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
// }
|
||||
}
|
||||
49
testdata/src/main/java/data/HelloWorldPrimitive.java
vendored
Normal file
49
testdata/src/main/java/data/HelloWorldPrimitive.java
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldPrimitive {
|
||||
|
||||
public int getValue() {
|
||||
return 42;
|
||||
}
|
||||
|
||||
public int getValueWithParams(String a, String b) {
|
||||
return Integer.valueOf(a) + Integer.valueOf(b);
|
||||
}
|
||||
|
||||
public float getValueFloat() {
|
||||
return 3.0f;
|
||||
}
|
||||
|
||||
public boolean getValueBoolean() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public short getValueShort() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public long getValueLong() {
|
||||
return 3L;
|
||||
}
|
||||
|
||||
public double getValueDouble() {
|
||||
return 3.0d;
|
||||
}
|
||||
|
||||
public char getValueChar() {
|
||||
return 'c';
|
||||
}
|
||||
|
||||
public byte getValueByte() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int[] getArrayInt() {
|
||||
return new int[] { 3 };
|
||||
}
|
||||
|
||||
public String[] getArrayString() {
|
||||
return new String[] { "ABC" };
|
||||
}
|
||||
|
||||
}
|
||||
48
testdata/src/main/java/data/HelloWorldPrimitive002.java
vendored
Normal file
48
testdata/src/main/java/data/HelloWorldPrimitive002.java
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldPrimitive002 {
|
||||
|
||||
public int getValue() {
|
||||
return 37;
|
||||
}
|
||||
|
||||
public boolean getValueBoolean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getValueWithParams(String a, String b) {
|
||||
return Integer.valueOf(a) + Integer.valueOf(b);
|
||||
}
|
||||
|
||||
public short getValueShort() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
public float getValueFloat() {
|
||||
return 6.0f;
|
||||
}
|
||||
|
||||
public double getValueDouble() {
|
||||
return 6.0d;
|
||||
}
|
||||
|
||||
public long getValueLong() {
|
||||
return 6L;
|
||||
}
|
||||
|
||||
public byte getValueByte() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
public char getValueChar() {
|
||||
return 'f';
|
||||
}
|
||||
|
||||
public int[] getArrayInt() {
|
||||
return new int[] { 5 };
|
||||
}
|
||||
|
||||
public String[] getArrayString() {
|
||||
return new String[] { "DEF" };
|
||||
}
|
||||
}
|
||||
34
testdata/src/main/java/data/HelloWorldStaticFields.java
vendored
Normal file
34
testdata/src/main/java/data/HelloWorldStaticFields.java
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldStaticFields {
|
||||
|
||||
static String theMessage = "Hello Andy";
|
||||
|
||||
public static void greet() {
|
||||
System.out.println(theMessage);
|
||||
}
|
||||
|
||||
public static void setMessage(String newValue) {
|
||||
theMessage = newValue;
|
||||
}
|
||||
|
||||
// public String getValue() {
|
||||
// return "message from HelloWorld";
|
||||
// }
|
||||
//
|
||||
// public String getValueWithParams(String a, String b) {
|
||||
// return "message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithParams(String a, String b) {
|
||||
// return "static message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
// return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
// return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
// }
|
||||
}
|
||||
34
testdata/src/main/java/data/HelloWorldStaticFields002.java
vendored
Normal file
34
testdata/src/main/java/data/HelloWorldStaticFields002.java
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
package data;
|
||||
|
||||
public class HelloWorldStaticFields002 {
|
||||
|
||||
static String theMessage = "Hello Christian";
|
||||
|
||||
public static void greet() {
|
||||
System.out.println(theMessage);
|
||||
}
|
||||
|
||||
public static void setMessage(String newValue) {
|
||||
theMessage = newValue;
|
||||
}
|
||||
|
||||
// public String getValue() {
|
||||
// return "message from HelloWorld";
|
||||
// }
|
||||
//
|
||||
// public String getValueWithParams(String a, String b) {
|
||||
// return "message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithParams(String a, String b) {
|
||||
// return "static message with inserts " + a + " and " + b;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveParams(String a, int i, char ch) {
|
||||
// return "message with inserts " + a + " and " + i + " and " + ch;
|
||||
// }
|
||||
//
|
||||
// public static String getStaticValueWithPrimitiveDSParams(long l, String a, double d, boolean b) {
|
||||
// return "message with inserts " + l + " and " + a + " and " + d + " and " + b;
|
||||
// }
|
||||
}
|
||||
10
testdata/src/main/java/data/Kiwi.java
vendored
Normal file
10
testdata/src/main/java/data/Kiwi.java
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package data;
|
||||
|
||||
public class Kiwi {
|
||||
|
||||
Plum plum = new Plum();
|
||||
|
||||
public void run() {
|
||||
plum.run();
|
||||
}
|
||||
}
|
||||
8
testdata/src/main/java/data/MiddleType.java
vendored
Normal file
8
testdata/src/main/java/data/MiddleType.java
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
package data;
|
||||
|
||||
public class MiddleType {
|
||||
|
||||
public String methodTwo(int i) {
|
||||
return "middle";
|
||||
}
|
||||
}
|
||||
65
testdata/src/main/java/data/Orange.java
vendored
Normal file
65
testdata/src/main/java/data/Orange.java
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
package data;
|
||||
|
||||
public class Orange {
|
||||
|
||||
Apple apple = new Apple();
|
||||
|
||||
public void one() {
|
||||
apple.run(); // simple case, no parameters and void return
|
||||
}
|
||||
|
||||
public void oneWithParam(String string) {
|
||||
apple.runWithParam(string);
|
||||
}
|
||||
|
||||
public String oneWithReturn() {
|
||||
return apple.runWithReturn();
|
||||
}
|
||||
|
||||
public int accessFieldOnApple() {
|
||||
int i = apple.intField;
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setFieldOnApple() {
|
||||
apple.intField = 35;
|
||||
}
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
public int getStaticFieldOnApple() {
|
||||
return apple.staticIntField;
|
||||
}
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
public void setStaticFieldOnApple() {
|
||||
apple.staticIntField = 35;
|
||||
}
|
||||
|
||||
// public String callApple1(String a, Integer b, String c, Integer d) {
|
||||
// return apple.run(a, b, c, d);
|
||||
// }
|
||||
|
||||
// public void oneCodeAfter() {
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// int j = 3;
|
||||
// System.out.println(j);
|
||||
// }
|
||||
//
|
||||
// public void oneCodeBefore() {
|
||||
// int k = 3;
|
||||
// System.out.println(k);
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// }
|
||||
//
|
||||
// public void oneCodeBeforeAndAfter() {
|
||||
// int k = 3;
|
||||
// System.out.println(k);
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// int j = 3;
|
||||
// System.out.println(j);
|
||||
// }
|
||||
|
||||
// public String oneWithReturn() {
|
||||
// return apple.runWithReturn();
|
||||
// }
|
||||
}
|
||||
86
testdata/src/main/java/data/Orange002.java
vendored
Normal file
86
testdata/src/main/java/data/Orange002.java
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
package data;
|
||||
|
||||
public class Orange002 {
|
||||
|
||||
Apple002 apple = new Apple002();
|
||||
|
||||
public String callApple1(String a, Integer b, String c, Integer d) {
|
||||
return apple.run(a, b, c, d);
|
||||
}
|
||||
|
||||
public String callApple2(int i) {
|
||||
return apple.run2(i);
|
||||
}
|
||||
|
||||
public Integer callApple3(int i) {
|
||||
return apple.run3(i);
|
||||
}
|
||||
|
||||
public String callApple3x(String s, int i, double d, String t, int[] is) {
|
||||
return apple.run(s, i, d, t, is);
|
||||
}
|
||||
|
||||
public static Integer callApple4(int i) {
|
||||
return Apple002.run4(i);
|
||||
}
|
||||
|
||||
public Float callAppleRetFloat(float i) {
|
||||
return apple.runGetFloat(i);
|
||||
}
|
||||
|
||||
public Boolean callAppleRetBoolean(boolean i) {
|
||||
return apple.runGetBoolean(i);
|
||||
}
|
||||
|
||||
public Short callAppleRetShort(short i) {
|
||||
return apple.runGetShort(i);
|
||||
}
|
||||
|
||||
public Long callAppleRetLong(long i) {
|
||||
return apple.runGetLong(i);
|
||||
}
|
||||
|
||||
public Double callAppleRetDouble(double i) {
|
||||
return apple.runGetDouble(i);
|
||||
}
|
||||
|
||||
public Character callAppleRetChar(char i) {
|
||||
return apple.runGetChar(i);
|
||||
}
|
||||
|
||||
public Byte callAppleRetByte(byte b) {
|
||||
return apple.runGetByte(b);
|
||||
}
|
||||
|
||||
public int[] callAppleRetArrayInt(int[] b) {
|
||||
return apple.runGetArrayInt(b);
|
||||
}
|
||||
|
||||
public String[] callAppleRetArrayString(String[] b) {
|
||||
return apple.runGetArrayString(b);
|
||||
}
|
||||
|
||||
// public void oneCodeAfter() {
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// int j = 3;
|
||||
// System.out.println(j);
|
||||
// }
|
||||
//
|
||||
// public void oneCodeBefore() {
|
||||
// int k = 3;
|
||||
// System.out.println(k);
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// }
|
||||
//
|
||||
// public void oneCodeBeforeAndAfter() {
|
||||
// int k = 3;
|
||||
// System.out.println(k);
|
||||
// apple.run(); // simple case, no parameters and void return
|
||||
// int j = 3;
|
||||
// System.out.println(j);
|
||||
// }
|
||||
|
||||
// public String oneWithReturn() {
|
||||
// return apple.runWithReturn();
|
||||
// }
|
||||
}
|
||||
26
testdata/src/main/java/data/Pear.java
vendored
Normal file
26
testdata/src/main/java/data/Pear.java
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package data;
|
||||
|
||||
public class Pear {
|
||||
|
||||
public int intField;
|
||||
public static int staticIntField;
|
||||
public int[] intArray = new int[] { 4, 3, 2, 1 };
|
||||
public static int[] staticIntArray = new int[] { 44, 33, 22, 11 };
|
||||
|
||||
public void run() {
|
||||
System.out.println("Apple.run() is running ");
|
||||
}
|
||||
|
||||
public int[] getIntArray() {
|
||||
return intArray;
|
||||
}
|
||||
|
||||
public String runWithReturn() {
|
||||
return "alphabeti spaghetti";
|
||||
}
|
||||
|
||||
public void runWithParam(String string) {
|
||||
System.out.println("Apple.run(" + string + ") is running ");
|
||||
}
|
||||
|
||||
}
|
||||
9
testdata/src/main/java/data/Plum.java
vendored
Normal file
9
testdata/src/main/java/data/Plum.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package data;
|
||||
|
||||
public class Plum {
|
||||
|
||||
public void run() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
13
testdata/src/main/java/data/Plum002.java
vendored
Normal file
13
testdata/src/main/java/data/Plum002.java
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
package data;
|
||||
|
||||
public class Plum002 {
|
||||
|
||||
public void run() {
|
||||
callPrivate();
|
||||
}
|
||||
|
||||
private void callPrivate() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
9
testdata/src/main/java/data/Reflector.java
vendored
Normal file
9
testdata/src/main/java/data/Reflector.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package data;
|
||||
|
||||
public class Reflector {
|
||||
|
||||
public void runOne() {
|
||||
AnnotatedClazz.class.getAnnotation(Anno.class);
|
||||
}
|
||||
|
||||
}
|
||||
33
testdata/src/main/java/data/Runner.java
vendored
Normal file
33
testdata/src/main/java/data/Runner.java
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package data;
|
||||
|
||||
/**
|
||||
* Long running program for checking watching and class replacement.
|
||||
*
|
||||
* @author Andy Clement
|
||||
*/
|
||||
public class Runner {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Runner().run();
|
||||
}
|
||||
|
||||
static Orange orange = new Orange();
|
||||
|
||||
/**
|
||||
* Every 10 seconds, call one()
|
||||
*/
|
||||
public void run() {
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
orange.one();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
12
testdata/src/main/java/data/ScenarioA.java
vendored
Normal file
12
testdata/src/main/java/data/ScenarioA.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
public class ScenarioA {
|
||||
|
||||
public String foo() {
|
||||
return "from ScenarioA";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
8
testdata/src/main/java/data/ScenarioA002.java
vendored
Normal file
8
testdata/src/main/java/data/ScenarioA002.java
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
package data;
|
||||
|
||||
public class ScenarioA002 {
|
||||
|
||||
public String foo() {
|
||||
return "from ScenarioA 002";
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/ScenarioA003.java
vendored
Normal file
12
testdata/src/main/java/data/ScenarioA003.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
public class ScenarioA003 {
|
||||
|
||||
public String foo() {
|
||||
return "from " + getValue();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "ScenarioA 003";
|
||||
}
|
||||
}
|
||||
21
testdata/src/main/java/data/ScenarioA004.java
vendored
Normal file
21
testdata/src/main/java/data/ScenarioA004.java
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
package data;
|
||||
|
||||
public class ScenarioA004 {
|
||||
|
||||
String name;
|
||||
|
||||
public String foo() {
|
||||
return "from " + getValue();
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
if (name == null) {
|
||||
name = "004";
|
||||
}
|
||||
return "ScenarioA " + name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
28
testdata/src/main/java/data/ScenarioB.java
vendored
Normal file
28
testdata/src/main/java/data/ScenarioB.java
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package data;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
public class ScenarioB {
|
||||
|
||||
public static String methodAccessor() {
|
||||
try {
|
||||
ScenarioB.class.getDeclaredMethod("foo");
|
||||
return "method found";
|
||||
} catch (Exception e) {
|
||||
return "method not found";
|
||||
}
|
||||
}
|
||||
|
||||
public static String annoAccessor() {
|
||||
try {
|
||||
Annotation[] annos = ScenarioB002.class.getDeclaredMethod("foo").getDeclaredAnnotations();
|
||||
if (annos == null || annos.length == 0) {
|
||||
return "no annotations";
|
||||
} else {
|
||||
return "found " + (annos[0]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "no annotations";
|
||||
}
|
||||
}
|
||||
}
|
||||
32
testdata/src/main/java/data/ScenarioB002.java
vendored
Normal file
32
testdata/src/main/java/data/ScenarioB002.java
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
package data;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
public class ScenarioB002 {
|
||||
|
||||
public static String methodAccessor() {
|
||||
try {
|
||||
ScenarioB002.class.getDeclaredMethod("foo");
|
||||
return "method found";
|
||||
} catch (Exception e) {
|
||||
return "method not found";
|
||||
}
|
||||
}
|
||||
|
||||
public static String annoAccessor() {
|
||||
try {
|
||||
Annotation[] annos = ScenarioB002.class.getDeclaredMethod("foo").getDeclaredAnnotations();
|
||||
if (annos == null || annos.length == 0) {
|
||||
return "no annotations";
|
||||
} else {
|
||||
return "found " + (annos[0]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "no annotations";
|
||||
}
|
||||
}
|
||||
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
}
|
||||
33
testdata/src/main/java/data/ScenarioB003.java
vendored
Normal file
33
testdata/src/main/java/data/ScenarioB003.java
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package data;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
public class ScenarioB003 {
|
||||
|
||||
public static String methodAccessor() {
|
||||
try {
|
||||
ScenarioB003.class.getDeclaredMethod("foo");
|
||||
return "method found";
|
||||
} catch (Exception e) {
|
||||
return "method not found";
|
||||
}
|
||||
}
|
||||
|
||||
public static String annoAccessor() {
|
||||
try {
|
||||
Annotation[] annos = ScenarioB003.class.getDeclaredMethod("foo").getDeclaredAnnotations();
|
||||
if (annos == null || annos.length == 0) {
|
||||
return "no annotations";
|
||||
} else {
|
||||
return "found " + (annos[0]);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return "no annotations";
|
||||
}
|
||||
}
|
||||
|
||||
@Wiggle
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
}
|
||||
26
testdata/src/main/java/data/Simple.java
vendored
Normal file
26
testdata/src/main/java/data/Simple.java
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
package data;
|
||||
|
||||
/**
|
||||
* Simple class that runs a method. Can we update the method without restarting the JVM.
|
||||
*/
|
||||
public class Simple {
|
||||
|
||||
public static void main(String[] argv) {
|
||||
Simple s = new Simple();
|
||||
s.run();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
System.out.println("Hello World3");
|
||||
}
|
||||
|
||||
public static void runStatic() {
|
||||
System.out.println("Hello World from static2");
|
||||
}
|
||||
|
||||
public void newmethod() {
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/data/SimpleClass.java
vendored
Normal file
7
testdata/src/main/java/data/SimpleClass.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package data;
|
||||
|
||||
class SimpleClass {
|
||||
public void foo() {
|
||||
|
||||
}
|
||||
}
|
||||
7
testdata/src/main/java/data/SimpleClass002.java
vendored
Normal file
7
testdata/src/main/java/data/SimpleClass002.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package data;
|
||||
|
||||
class SimpleClass002 {
|
||||
public String bar() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
9
testdata/src/main/java/data/SimpleClassCaller.java
vendored
Normal file
9
testdata/src/main/java/data/SimpleClassCaller.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package data;
|
||||
|
||||
public class SimpleClassCaller {
|
||||
|
||||
public void m() {
|
||||
SimpleClass sc = new SimpleClass();
|
||||
sc.foo();
|
||||
}
|
||||
}
|
||||
35
testdata/src/main/java/data/SimpleClassFour.java
vendored
Normal file
35
testdata/src/main/java/data/SimpleClassFour.java
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package data;
|
||||
|
||||
class SimpleClassFour {
|
||||
{
|
||||
System.out.println("clinit!");
|
||||
}
|
||||
|
||||
public int boo;
|
||||
|
||||
public static String s;
|
||||
|
||||
public SimpleClassFour(int i) {
|
||||
}
|
||||
|
||||
public SimpleClassFour(String d) {
|
||||
}
|
||||
|
||||
void boo() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static void foo() {
|
||||
}
|
||||
|
||||
public String goo(int i, double d, String p) {
|
||||
return p;
|
||||
}
|
||||
|
||||
public static int hoo(long l) {
|
||||
return new Long(l).intValue();
|
||||
}
|
||||
|
||||
public static void woo() throws RuntimeException, IllegalStateException {
|
||||
}
|
||||
}
|
||||
43
testdata/src/main/java/data/SimpleClassFour002.java
vendored
Normal file
43
testdata/src/main/java/data/SimpleClassFour002.java
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
package data;
|
||||
|
||||
class SimpleClassFour002 {
|
||||
{
|
||||
System.out.println("clinit!");
|
||||
}
|
||||
|
||||
public int boo;
|
||||
|
||||
public static String s;
|
||||
|
||||
public SimpleClassFour002(int i) {
|
||||
}
|
||||
|
||||
public SimpleClassFour002(String d) {
|
||||
}
|
||||
|
||||
public static Double extraTwo(int i) {
|
||||
return 2.0d;
|
||||
}
|
||||
|
||||
void boo() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static void foo() {
|
||||
}
|
||||
|
||||
public String goo(int i, double d, String p) {
|
||||
return p;
|
||||
}
|
||||
|
||||
public static int hoo(long l) {
|
||||
return new Long(l).intValue();
|
||||
}
|
||||
|
||||
public static void woo() throws RuntimeException, IllegalStateException {
|
||||
}
|
||||
|
||||
public void extraOne(String s) {
|
||||
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/SimpleClassThree.java
vendored
Normal file
12
testdata/src/main/java/data/SimpleClassThree.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
class SimpleClassThree {
|
||||
public static String foo(List list, Map m) throws IOException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/SimpleClassTwo.java
vendored
Normal file
12
testdata/src/main/java/data/SimpleClassTwo.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
class SimpleClassTwo {
|
||||
public String foo(List list, Map m) throws IOException {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
15
testdata/src/main/java/data/SomeConstructors.java
vendored
Normal file
15
testdata/src/main/java/data/SomeConstructors.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package data;
|
||||
|
||||
// TODO [rc1] what about varargs - any testing done for it?
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class SomeConstructors {
|
||||
public SomeConstructors() {
|
||||
}
|
||||
|
||||
private SomeConstructors(String s, int i) {
|
||||
}
|
||||
|
||||
protected SomeConstructors(long l) {
|
||||
}
|
||||
}
|
||||
12
testdata/src/main/java/data/SomeConstructors002.java
vendored
Normal file
12
testdata/src/main/java/data/SomeConstructors002.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
class SomeConstructors002 {
|
||||
public SomeConstructors002() {
|
||||
}
|
||||
// deleted
|
||||
// private SomeConstructors002(String s, int i) {
|
||||
// }
|
||||
//
|
||||
// protected SomeConstructors002(long l) {
|
||||
// }
|
||||
}
|
||||
5
testdata/src/main/java/data/SomeConstructors2.java
vendored
Normal file
5
testdata/src/main/java/data/SomeConstructors2.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package data;
|
||||
|
||||
public class SomeConstructors2 {
|
||||
// will have a default constructor
|
||||
}
|
||||
12
testdata/src/main/java/data/SomeFields.java
vendored
Normal file
12
testdata/src/main/java/data/SomeFields.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@SuppressWarnings({ "unused", "serial" })
|
||||
class SomeFields extends SimpleClass implements java.io.Serializable {
|
||||
private int privateField;
|
||||
public String publicField;
|
||||
List<String> defaultField;
|
||||
protected Map<String, List<Integer>> protectedField;
|
||||
}
|
||||
87
testdata/src/main/java/data/StaticFieldsB.java
vendored
Normal file
87
testdata/src/main/java/data/StaticFieldsB.java
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
package data;
|
||||
|
||||
public class StaticFieldsB {
|
||||
|
||||
static int i = 23;
|
||||
static boolean b = false;
|
||||
static char c = 'a';
|
||||
static short s = 123;
|
||||
static long l = 32768 * 327;
|
||||
static double d = 2.0d;
|
||||
static float f = 1.4f;
|
||||
static Boolean[] bs = new Boolean[] { true, false, true };
|
||||
static String theMessage = "Hello Andy";
|
||||
|
||||
public static boolean isB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public Boolean[] getBs() {
|
||||
return bs;
|
||||
}
|
||||
|
||||
public void setBs(Boolean[] newbs) {
|
||||
bs = newbs;
|
||||
}
|
||||
|
||||
public static void setB(boolean bb) {
|
||||
b = bb;
|
||||
}
|
||||
|
||||
public static char getC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public static void setC(char cc) {
|
||||
c = cc;
|
||||
}
|
||||
|
||||
public static short getS() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public static void setS(short ss) {
|
||||
s = ss;
|
||||
}
|
||||
|
||||
public static long getL() {
|
||||
return l;
|
||||
}
|
||||
|
||||
public static void setL(long ll) {
|
||||
l = ll;
|
||||
}
|
||||
|
||||
public static double getD() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public static void setD(double dd) {
|
||||
d = dd;
|
||||
}
|
||||
|
||||
public static float getF() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public static void setF(float ff) {
|
||||
f = ff;
|
||||
}
|
||||
|
||||
public static String getTheMessage() {
|
||||
return theMessage;
|
||||
}
|
||||
|
||||
public static void setTheMessage(String newvalue) {
|
||||
theMessage = newvalue;
|
||||
}
|
||||
|
||||
public static void setI(int ii) {
|
||||
i = ii;
|
||||
}
|
||||
|
||||
public static int getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
12
testdata/src/main/java/data/TopType.java
vendored
Normal file
12
testdata/src/main/java/data/TopType.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package data;
|
||||
|
||||
public class TopType {
|
||||
|
||||
public int methodOne(String[] ss) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public String methodTwo(int i) {
|
||||
return "top";
|
||||
}
|
||||
}
|
||||
9
testdata/src/main/java/data/Wiggle.java
vendored
Normal file
9
testdata/src/main/java/data/Wiggle.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package data;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Wiggle {
|
||||
String value() default "default";
|
||||
}
|
||||
Reference in New Issue
Block a user