mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
add bare-bones set of Java classes for testing
This commit is contained in:
parent
91b9dc7382
commit
ccd71b0d99
7
input/Test.java
Normal file
7
input/Test.java
Normal file
@ -0,0 +1,7 @@
|
||||
public class Test {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int a = 2 + 2;
|
||||
}
|
||||
|
||||
}
|
7
input/java/lang/Class.java
Normal file
7
input/java/lang/Class.java
Normal file
@ -0,0 +1,7 @@
|
||||
package java.lang;
|
||||
|
||||
public final class Class <T> {
|
||||
private Object body;
|
||||
|
||||
private Class() { }
|
||||
}
|
47
input/java/lang/Object.java
Normal file
47
input/java/lang/Object.java
Normal file
@ -0,0 +1,47 @@
|
||||
package java.lang;
|
||||
|
||||
import vm.VM;
|
||||
|
||||
public class Object {
|
||||
protected Object clone() {
|
||||
return VM.clone(this);
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
return this == o;
|
||||
}
|
||||
|
||||
protected void finalize() { }
|
||||
|
||||
public final Class<? extends Object> getClass() {
|
||||
return VM.getClass(this);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return VM.hashCode(this);
|
||||
}
|
||||
|
||||
public final void notify() {
|
||||
VM.notify(this);
|
||||
}
|
||||
|
||||
public final void notifyAll() {
|
||||
VM.notifyAll(this);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return VM.toString(this);
|
||||
}
|
||||
|
||||
public final void wait() {
|
||||
VM.wait(this);
|
||||
}
|
||||
|
||||
public final void wait(long timeout) {
|
||||
VM.wait(this, timeout);
|
||||
}
|
||||
|
||||
public final void wait(long timeout, int nanos) {
|
||||
VM.wait(this, timeout, nanos);
|
||||
}
|
||||
}
|
8
input/java/lang/String.java
Normal file
8
input/java/lang/String.java
Normal file
@ -0,0 +1,8 @@
|
||||
package java.lang;
|
||||
|
||||
public final class String {
|
||||
private byte[] bytes;
|
||||
private int offset;
|
||||
private int length;
|
||||
private int hash;
|
||||
}
|
6
input/java/lang/Throwable.java
Normal file
6
input/java/lang/Throwable.java
Normal file
@ -0,0 +1,6 @@
|
||||
package java.lang;
|
||||
|
||||
public class Throwable {
|
||||
private String message;
|
||||
private Object trace;
|
||||
}
|
21
input/vm/VM.java
Normal file
21
input/vm/VM.java
Normal file
@ -0,0 +1,21 @@
|
||||
package vm;
|
||||
|
||||
public class VM {
|
||||
public static native Object clone(Object o);
|
||||
|
||||
public static native Class<? extends Object> getClass(Object o);
|
||||
|
||||
public static native int hashCode(Object o);
|
||||
|
||||
public static native void notify(Object o);
|
||||
|
||||
public static native void notifyAll(Object o);
|
||||
|
||||
public static native String toString(Object o);
|
||||
|
||||
public static native void wait(Object o);
|
||||
|
||||
public static native void wait(Object o, long timeout);
|
||||
|
||||
public static native void wait(Object o, long timeout, int nanos);
|
||||
}
|
Loading…
Reference in New Issue
Block a user