renamed all modules
This commit is contained in:
7
testdata/src/main/java/fields/A.java
vendored
Normal file
7
testdata/src/main/java/fields/A.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class A {
|
||||
|
||||
int i = 1;
|
||||
String s = "fromA";
|
||||
}
|
||||
7
testdata/src/main/java/fields/Aa.java
vendored
Normal file
7
testdata/src/main/java/fields/Aa.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Aa {
|
||||
|
||||
static int i = 1;
|
||||
static String s = "fromA";
|
||||
}
|
||||
12
testdata/src/main/java/fields/Add.java
vendored
Normal file
12
testdata/src/main/java/fields/Add.java
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
package fields;
|
||||
|
||||
public class Add {
|
||||
|
||||
public int getValue() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setValue(int newvalue) {
|
||||
}
|
||||
|
||||
}
|
||||
15
testdata/src/main/java/fields/Add002.java
vendored
Normal file
15
testdata/src/main/java/fields/Add002.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package fields;
|
||||
|
||||
public class Add002 {
|
||||
|
||||
int i;
|
||||
|
||||
public int getValue() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setValue(int newvalue) {
|
||||
i = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
47
testdata/src/main/java/fields/AddB.java
vendored
Normal file
47
testdata/src/main/java/fields/AddB.java
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
package fields;
|
||||
|
||||
public class AddB {
|
||||
|
||||
public short getShort() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setShort(short newvalue) {
|
||||
}
|
||||
|
||||
public boolean getBoolean() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setBoolean(boolean newvalue) {
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public void setLong(long newvalue) {
|
||||
}
|
||||
|
||||
public float getFloat() {
|
||||
return 0f;
|
||||
}
|
||||
|
||||
public void setFloat(float newvalue) {
|
||||
}
|
||||
|
||||
public char getChar() {
|
||||
return 'a';
|
||||
}
|
||||
|
||||
public void setChar(char newvalue) {
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
return 0d;
|
||||
}
|
||||
|
||||
public void setDouble(double newvalue) {
|
||||
}
|
||||
|
||||
}
|
||||
60
testdata/src/main/java/fields/AddB002.java
vendored
Normal file
60
testdata/src/main/java/fields/AddB002.java
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
package fields;
|
||||
|
||||
public class AddB002 {
|
||||
|
||||
short s;
|
||||
boolean b;
|
||||
long l;
|
||||
double d;
|
||||
float f;
|
||||
char c;
|
||||
|
||||
public short getShort() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setShort(short newvalue) {
|
||||
this.s = newvalue;
|
||||
}
|
||||
|
||||
public boolean getBoolean() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setBoolean(boolean newvalue) {
|
||||
this.b = newvalue;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return l;
|
||||
}
|
||||
|
||||
public void setLong(long newvalue) {
|
||||
this.l = newvalue;
|
||||
}
|
||||
|
||||
public float getFloat() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public void setFloat(float newvalue) {
|
||||
this.f = newvalue;
|
||||
}
|
||||
|
||||
public char getChar() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setChar(char newvalue) {
|
||||
this.c = newvalue;
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setDouble(double newvalue) {
|
||||
this.d = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/fields/B.java
vendored
Normal file
7
testdata/src/main/java/fields/B.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class B extends A {
|
||||
|
||||
int i = 2;
|
||||
String s = "fromB";
|
||||
}
|
||||
6
testdata/src/main/java/fields/B2.java
vendored
Normal file
6
testdata/src/main/java/fields/B2.java
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package fields;
|
||||
|
||||
public class B2 extends A {
|
||||
|
||||
// fields removed, exposing those in A (a non reloadable type)
|
||||
}
|
||||
7
testdata/src/main/java/fields/Ba.java
vendored
Normal file
7
testdata/src/main/java/fields/Ba.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Ba extends Aa {
|
||||
|
||||
static int i = 2;
|
||||
static String s = "fromB";
|
||||
}
|
||||
6
testdata/src/main/java/fields/Ba2.java
vendored
Normal file
6
testdata/src/main/java/fields/Ba2.java
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package fields;
|
||||
|
||||
public class Ba2 extends Aa {
|
||||
|
||||
// fields removed, exposing those in A (a non reloadable type)
|
||||
}
|
||||
20
testdata/src/main/java/fields/C.java
vendored
Normal file
20
testdata/src/main/java/fields/C.java
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package fields;
|
||||
|
||||
public class C extends B {
|
||||
|
||||
public void setInt(int newvalue) {
|
||||
this.i = newvalue;
|
||||
}
|
||||
|
||||
public void setString(String newString) {
|
||||
this.s = newString;
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return this.s;
|
||||
}
|
||||
|
||||
public int getInt() {
|
||||
return this.i;
|
||||
}
|
||||
}
|
||||
21
testdata/src/main/java/fields/Ca.java
vendored
Normal file
21
testdata/src/main/java/fields/Ca.java
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
package fields;
|
||||
|
||||
@SuppressWarnings("static-access")
|
||||
public class Ca extends Ba {
|
||||
|
||||
public void setInt(int newvalue) {
|
||||
this.i = newvalue;
|
||||
}
|
||||
|
||||
public void setString(String newString) {
|
||||
this.s = newString;
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return this.s;
|
||||
}
|
||||
|
||||
public int getInt() {
|
||||
return this.i;
|
||||
}
|
||||
}
|
||||
78
testdata/src/main/java/fields/E.java
vendored
Normal file
78
testdata/src/main/java/fields/E.java
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
package fields;
|
||||
|
||||
public class E {
|
||||
|
||||
int i = 100;
|
||||
short s = 200;
|
||||
boolean z = true;
|
||||
long j = 324L;
|
||||
float f = 32f;
|
||||
double d = 2.5d;
|
||||
char c = 'a';
|
||||
byte b = (byte) 255;
|
||||
|
||||
public int getInt() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setInt(int newvalue) {
|
||||
i = newvalue;
|
||||
}
|
||||
|
||||
public short getShort() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setShort(short newvalue) {
|
||||
s = newvalue;
|
||||
}
|
||||
|
||||
public boolean getBoolean() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public void setBoolean(boolean newvalue) {
|
||||
z = newvalue;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setLong(long newvalue) {
|
||||
j = newvalue;
|
||||
}
|
||||
|
||||
public float getFloat() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public void setFloat(float newvalue) {
|
||||
f = newvalue;
|
||||
}
|
||||
|
||||
public char getChar() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setChar(char newvalue) {
|
||||
c = newvalue;
|
||||
}
|
||||
|
||||
public byte getByte() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setByte(byte newvalue) {
|
||||
b = newvalue;
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setDouble(double newvalue) {
|
||||
d = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
78
testdata/src/main/java/fields/E2.java
vendored
Normal file
78
testdata/src/main/java/fields/E2.java
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
package fields;
|
||||
|
||||
public class E2 {
|
||||
|
||||
Integer i = 100;
|
||||
Short s = 200;
|
||||
Boolean z = true;
|
||||
Long j = 324L;
|
||||
Float f = 32f;
|
||||
Double d = 2.5d;
|
||||
Character c = 'a';
|
||||
Byte b = (byte) 255;
|
||||
|
||||
public int getInt() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setInt(int newvalue) {
|
||||
i = newvalue;
|
||||
}
|
||||
|
||||
public short getShort() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public void setShort(short newvalue) {
|
||||
s = newvalue;
|
||||
}
|
||||
|
||||
public boolean getBoolean() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public void setBoolean(boolean newvalue) {
|
||||
z = newvalue;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setLong(long newvalue) {
|
||||
j = newvalue;
|
||||
}
|
||||
|
||||
public float getFloat() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public void setFloat(float newvalue) {
|
||||
f = newvalue;
|
||||
}
|
||||
|
||||
public char getChar() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setChar(char newvalue) {
|
||||
c = newvalue;
|
||||
}
|
||||
|
||||
public byte getByte() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setByte(byte newvalue) {
|
||||
b = newvalue;
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setDouble(double newvalue) {
|
||||
d = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/fields/Ia.java
vendored
Normal file
7
testdata/src/main/java/fields/Ia.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Ia {
|
||||
|
||||
int field = 5;
|
||||
|
||||
}
|
||||
5
testdata/src/main/java/fields/Ic.java
vendored
Normal file
5
testdata/src/main/java/fields/Ic.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public interface Ic {
|
||||
int number = 42;
|
||||
}
|
||||
13
testdata/src/main/java/fields/Ja.java
vendored
Normal file
13
testdata/src/main/java/fields/Ja.java
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
package fields;
|
||||
|
||||
public class Ja extends Ia {
|
||||
|
||||
public int getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(int newvalue) {
|
||||
field = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
9
testdata/src/main/java/fields/Ka.java
vendored
Normal file
9
testdata/src/main/java/fields/Ka.java
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
package fields;
|
||||
|
||||
public class Ka extends Ja {
|
||||
|
||||
public static void main(String[] argv) {
|
||||
System.out.println(new Ka().getField());
|
||||
}
|
||||
|
||||
}
|
||||
11
testdata/src/main/java/fields/Ka002.java
vendored
Normal file
11
testdata/src/main/java/fields/Ka002.java
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
package fields;
|
||||
|
||||
public class Ka002 extends Ja {
|
||||
|
||||
int field;
|
||||
|
||||
public static void main(String[] argv) {
|
||||
System.out.println(new Ka002().getField());
|
||||
}
|
||||
|
||||
}
|
||||
14
testdata/src/main/java/fields/NotReloadable.java
vendored
Normal file
14
testdata/src/main/java/fields/NotReloadable.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package fields;
|
||||
|
||||
public class NotReloadable {
|
||||
|
||||
public int i = 5;
|
||||
|
||||
public void setI_NotReloadable(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
public int getI_NotReloadable() {
|
||||
return this.i;
|
||||
}
|
||||
}
|
||||
33
testdata/src/main/java/fields/One.java
vendored
Normal file
33
testdata/src/main/java/fields/One.java
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
package fields;
|
||||
|
||||
public class One {
|
||||
String a = "a from One";
|
||||
String b = "b from One";
|
||||
|
||||
private String c = "c from One";
|
||||
|
||||
public String getOneA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public String getOneB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public String getOneC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setOneA(String newValue) {
|
||||
a = newValue;
|
||||
}
|
||||
|
||||
public void setOneB(String newValue) {
|
||||
b = newValue;
|
||||
}
|
||||
|
||||
public void setOneC(String newValue) {
|
||||
c = newValue;
|
||||
}
|
||||
|
||||
}
|
||||
5
testdata/src/main/java/fields/P.java
vendored
Normal file
5
testdata/src/main/java/fields/P.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public class P {
|
||||
public int i = 1;
|
||||
}
|
||||
5
testdata/src/main/java/fields/Pa.java
vendored
Normal file
5
testdata/src/main/java/fields/Pa.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public class Pa {
|
||||
public int i = 1;
|
||||
}
|
||||
5
testdata/src/main/java/fields/Q.java
vendored
Normal file
5
testdata/src/main/java/fields/Q.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public class Q extends P {
|
||||
public int i = 2;
|
||||
}
|
||||
6
testdata/src/main/java/fields/Q2.java
vendored
Normal file
6
testdata/src/main/java/fields/Q2.java
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package fields;
|
||||
|
||||
public class Q2 extends P {
|
||||
// public int i = 1;
|
||||
|
||||
}
|
||||
5
testdata/src/main/java/fields/Qa.java
vendored
Normal file
5
testdata/src/main/java/fields/Qa.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public class Qa extends Pa {
|
||||
public int i = 2;
|
||||
}
|
||||
6
testdata/src/main/java/fields/Qa2.java
vendored
Normal file
6
testdata/src/main/java/fields/Qa2.java
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package fields;
|
||||
|
||||
public class Qa2 extends Pa {
|
||||
// public int i = 1;
|
||||
|
||||
}
|
||||
6
testdata/src/main/java/fields/Qc.java
vendored
Normal file
6
testdata/src/main/java/fields/Qc.java
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
package fields;
|
||||
|
||||
public class Qc implements Ic {
|
||||
public int number = 2;
|
||||
|
||||
}
|
||||
5
testdata/src/main/java/fields/Qc2.java
vendored
Normal file
5
testdata/src/main/java/fields/Qc2.java
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
package fields;
|
||||
|
||||
public class Qc2 implements Ic {
|
||||
// public int number = 2;
|
||||
}
|
||||
7
testdata/src/main/java/fields/R.java
vendored
Normal file
7
testdata/src/main/java/fields/R.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class R extends Q {
|
||||
public int getI() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
7
testdata/src/main/java/fields/Ra.java
vendored
Normal file
7
testdata/src/main/java/fields/Ra.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Ra extends Qa {
|
||||
public int getI() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
10
testdata/src/main/java/fields/Rc.java
vendored
Normal file
10
testdata/src/main/java/fields/Rc.java
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package fields;
|
||||
|
||||
public class Rc extends Qc {
|
||||
public int getNumber() {
|
||||
return number;
|
||||
}
|
||||
public static void main(String []argv) {
|
||||
System.out.println(new Rc().getNumber());
|
||||
}
|
||||
}
|
||||
20
testdata/src/main/java/fields/ReloadableBottom.java
vendored
Normal file
20
testdata/src/main/java/fields/ReloadableBottom.java
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package fields;
|
||||
|
||||
public class ReloadableBottom extends ReloadableTop {
|
||||
|
||||
public void setI_ReloadableBottom(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
public int getI_ReloadableBottom() {
|
||||
return this.i;
|
||||
}
|
||||
|
||||
// public void setJ_ReloadableBottom(int newj) {
|
||||
// this.j = newj;
|
||||
// }
|
||||
//
|
||||
// public int getJ_ReloadableBottom() {
|
||||
// return this.j;
|
||||
// }
|
||||
}
|
||||
22
testdata/src/main/java/fields/ReloadableTop.java
vendored
Normal file
22
testdata/src/main/java/fields/ReloadableTop.java
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package fields;
|
||||
|
||||
public class ReloadableTop extends NotReloadable {
|
||||
|
||||
// public int j = 37;
|
||||
|
||||
public void setI_ReloadableTop(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
public int getI_ReloadableTop() {
|
||||
return this.i;
|
||||
}
|
||||
//
|
||||
// public void setJ_ReloadableTop(int newj) {
|
||||
// this.j = newj;
|
||||
// }
|
||||
//
|
||||
// public int getJ_ReloadableTop() {
|
||||
// return this.j;
|
||||
// }
|
||||
}
|
||||
24
testdata/src/main/java/fields/ReloadableTop002.java
vendored
Normal file
24
testdata/src/main/java/fields/ReloadableTop002.java
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package fields;
|
||||
|
||||
public class ReloadableTop002 extends NotReloadable {
|
||||
|
||||
// public int j = 37;
|
||||
|
||||
public int i = 12345;
|
||||
|
||||
public void setI_ReloadableTop(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
public int getI_ReloadableTop() {
|
||||
return this.i;
|
||||
}
|
||||
//
|
||||
// public void setJ_ReloadableTop(int newj) {
|
||||
// this.j = newj;
|
||||
// }
|
||||
//
|
||||
// public int getJ_ReloadableTop() {
|
||||
// return this.j;
|
||||
// }
|
||||
}
|
||||
15
testdata/src/main/java/fields/Removed.java
vendored
Normal file
15
testdata/src/main/java/fields/Removed.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package fields;
|
||||
|
||||
public class Removed {
|
||||
|
||||
int i;
|
||||
|
||||
public int getValue() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setValue(int newvalue) {
|
||||
this.i = newvalue;
|
||||
}
|
||||
|
||||
}
|
||||
13
testdata/src/main/java/fields/Removed002.java
vendored
Normal file
13
testdata/src/main/java/fields/Removed002.java
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
package fields;
|
||||
|
||||
public class Removed002 {
|
||||
|
||||
public int getValue() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setValue(int newvalue) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
8
testdata/src/main/java/fields/S.java
vendored
Normal file
8
testdata/src/main/java/fields/S.java
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
package fields;
|
||||
|
||||
public class S {
|
||||
|
||||
public int getValue() {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
10
testdata/src/main/java/fields/S2.java
vendored
Normal file
10
testdata/src/main/java/fields/S2.java
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
package fields;
|
||||
|
||||
public class S2 {
|
||||
|
||||
int i;
|
||||
|
||||
public int getValue() {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
14
testdata/src/main/java/fields/T.java
vendored
Normal file
14
testdata/src/main/java/fields/T.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package fields;
|
||||
|
||||
public class T {
|
||||
int i = 345;
|
||||
String j = "stringValue";
|
||||
|
||||
public Object getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public Object getJ() {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
14
testdata/src/main/java/fields/T2.java
vendored
Normal file
14
testdata/src/main/java/fields/T2.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package fields;
|
||||
|
||||
public class T2 {
|
||||
String i; // was 'int i'
|
||||
int j; // was 'String j'
|
||||
|
||||
public Object getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public Object getJ() {
|
||||
return j;
|
||||
}
|
||||
}
|
||||
31
testdata/src/main/java/fields/Two.java
vendored
Normal file
31
testdata/src/main/java/fields/Two.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
package fields;
|
||||
|
||||
public class Two extends One {
|
||||
String b = "b from Two";
|
||||
private String c = "c from Two";
|
||||
|
||||
public String getTwoA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public String getTwoB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public String getTwoC() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public void setTwoA(String newValue) {
|
||||
a = newValue;
|
||||
}
|
||||
|
||||
public void setTwoB(String newValue) {
|
||||
b = newValue;
|
||||
}
|
||||
|
||||
public void setTwoC(String newValue) {
|
||||
c = newValue;
|
||||
}
|
||||
|
||||
}
|
||||
24
testdata/src/main/java/fields/TwoSlot.java
vendored
Normal file
24
testdata/src/main/java/fields/TwoSlot.java
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package fields;
|
||||
|
||||
public class TwoSlot {
|
||||
|
||||
double d = 34.5d;
|
||||
|
||||
long l = 123L;
|
||||
|
||||
public double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public void setDouble(double d) {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return l;
|
||||
}
|
||||
|
||||
public void setLong(long l) {
|
||||
this.l = l;
|
||||
}
|
||||
}
|
||||
24
testdata/src/main/java/fields/TwoSlot2.java
vendored
Normal file
24
testdata/src/main/java/fields/TwoSlot2.java
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package fields;
|
||||
|
||||
public class TwoSlot2 {
|
||||
|
||||
double dd;
|
||||
|
||||
long ll;
|
||||
|
||||
public double getDouble() {
|
||||
return dd;
|
||||
}
|
||||
|
||||
public void setDouble(double d) {
|
||||
this.dd = d;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return ll;
|
||||
}
|
||||
|
||||
public void setLong(long l) {
|
||||
this.ll = l;
|
||||
}
|
||||
}
|
||||
78
testdata/src/main/java/fields/TypeChanging.java
vendored
Normal file
78
testdata/src/main/java/fields/TypeChanging.java
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
package fields;
|
||||
|
||||
public class TypeChanging {
|
||||
|
||||
int i = 1;
|
||||
boolean z = true;
|
||||
long j = 34L;
|
||||
float f = 2.0f;
|
||||
char c = 'a';
|
||||
byte b = (byte) 0xff;
|
||||
short s = (short) 32;
|
||||
double d = 3.141d;
|
||||
Super superinstance = new Sub();
|
||||
int[] wasArray = new int[] { 1, 2, 3 };
|
||||
String wasNotArray = "abc";
|
||||
|
||||
public Super getSuper() {
|
||||
return superinstance;
|
||||
}
|
||||
|
||||
public Integer getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public Boolean getBoolean() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public Long getLong() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public Float getFloat() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public Character getChar() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public Byte getByte() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public Short getShort() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public Double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public Object getWasArray() {
|
||||
return wasArray;
|
||||
}
|
||||
|
||||
public Object getWasNotArray() {
|
||||
return wasNotArray;
|
||||
}
|
||||
}
|
||||
|
||||
class Super {
|
||||
public String toString() {
|
||||
return "SuperInstance";
|
||||
}
|
||||
}
|
||||
|
||||
class Middle extends Super {
|
||||
public String toString() {
|
||||
return "MiddleInstance";
|
||||
}
|
||||
}
|
||||
|
||||
class Sub extends Middle {
|
||||
public String toString() {
|
||||
return "SubInstance";
|
||||
}
|
||||
}
|
||||
61
testdata/src/main/java/fields/TypeChanging2.java
vendored
Normal file
61
testdata/src/main/java/fields/TypeChanging2.java
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
package fields;
|
||||
|
||||
public class TypeChanging2 {
|
||||
|
||||
Integer i = 1;
|
||||
Boolean z = true;
|
||||
Long j = 34L;
|
||||
Float f = 2.0f;
|
||||
Character c = 'a';
|
||||
Byte b = (byte) 0x255;
|
||||
Short s = (short) 32;
|
||||
Double d = 3.141d;
|
||||
Middle superinstance = new Sub();
|
||||
|
||||
int wasArray;
|
||||
String[] wasNotArray;
|
||||
|
||||
public Super getSuper() {
|
||||
return superinstance;
|
||||
}
|
||||
|
||||
public Integer getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public Boolean getBoolean() {
|
||||
return z;
|
||||
}
|
||||
|
||||
public Long getLong() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public Float getFloat() {
|
||||
return f;
|
||||
}
|
||||
|
||||
public Character getChar() {
|
||||
return c;
|
||||
}
|
||||
|
||||
public Byte getByte() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public Short getShort() {
|
||||
return s;
|
||||
}
|
||||
|
||||
public Double getDouble() {
|
||||
return d;
|
||||
}
|
||||
|
||||
public Object getWasArray() {
|
||||
return wasArray;
|
||||
}
|
||||
|
||||
public Object getWasNotArray() {
|
||||
return wasNotArray;
|
||||
}
|
||||
}
|
||||
22
testdata/src/main/java/fields/X.java
vendored
Normal file
22
testdata/src/main/java/fields/X.java
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package fields;
|
||||
|
||||
public class X {
|
||||
|
||||
public int i = 5;
|
||||
|
||||
public int getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setI(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
// do nothing, no field called J yet
|
||||
public int getJ() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
}
|
||||
}
|
||||
24
testdata/src/main/java/fields/X002.java
vendored
Normal file
24
testdata/src/main/java/fields/X002.java
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package fields;
|
||||
|
||||
public class X002 {
|
||||
|
||||
public int i;
|
||||
|
||||
public int j;
|
||||
|
||||
public int getI() {
|
||||
return i;
|
||||
}
|
||||
|
||||
public void setI(int newi) {
|
||||
this.i = newi;
|
||||
}
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
this.j = newj;
|
||||
}
|
||||
}
|
||||
14
testdata/src/main/java/fields/Y.java
vendored
Normal file
14
testdata/src/main/java/fields/Y.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package fields;
|
||||
|
||||
public class Y {
|
||||
|
||||
int j = 5;
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
14
testdata/src/main/java/fields/Y002.java
vendored
Normal file
14
testdata/src/main/java/fields/Y002.java
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
package fields;
|
||||
|
||||
public class Y002 {
|
||||
|
||||
static int j;
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
7
testdata/src/main/java/fields/Ya.java
vendored
Normal file
7
testdata/src/main/java/fields/Ya.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Ya {
|
||||
|
||||
int j = 5;
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/fields/Ya002.java
vendored
Normal file
7
testdata/src/main/java/fields/Ya002.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Ya002 {
|
||||
|
||||
static int j; // made static
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/fields/Yb.java
vendored
Normal file
7
testdata/src/main/java/fields/Yb.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Yb {
|
||||
|
||||
static int j = 5;
|
||||
|
||||
}
|
||||
7
testdata/src/main/java/fields/Yb002.java
vendored
Normal file
7
testdata/src/main/java/fields/Yb002.java
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package fields;
|
||||
|
||||
public class Yb002 {
|
||||
|
||||
int j; // made non static
|
||||
|
||||
}
|
||||
17
testdata/src/main/java/fields/Z.java
vendored
Normal file
17
testdata/src/main/java/fields/Z.java
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
package fields;
|
||||
|
||||
public class Z {
|
||||
|
||||
static int j = 5;
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
|
||||
// see http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc5.html.
|
||||
// TODO [rc1] funky field lookups only necessary for protected fields?
|
||||
15
testdata/src/main/java/fields/Za.java
vendored
Normal file
15
testdata/src/main/java/fields/Za.java
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package fields;
|
||||
|
||||
public class Za extends Ya {
|
||||
|
||||
public static void main(String[]argv) {
|
||||
System.out.println(new Za().getJ());
|
||||
}
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
16
testdata/src/main/java/fields/Za002.java
vendored
Normal file
16
testdata/src/main/java/fields/Za002.java
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package fields;
|
||||
|
||||
public class Za002 extends Ya002 {
|
||||
|
||||
public static void main(String[] argv) {
|
||||
System.out.println(new Za002().getJ());
|
||||
}
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
16
testdata/src/main/java/fields/Zb.java
vendored
Normal file
16
testdata/src/main/java/fields/Zb.java
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
package fields;
|
||||
|
||||
public class Zb extends Yb {
|
||||
|
||||
public static void main(String[] argv) {
|
||||
System.out.println(new Zb().getJ());
|
||||
}
|
||||
|
||||
public int getJ() {
|
||||
return j;
|
||||
}
|
||||
|
||||
public void setJ(int newj) {
|
||||
j = newj;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user