mirror of
https://github.com/corda/corda.git
synced 2025-06-13 04:38:19 +00:00
make builtin class type a bootstrap version of java/lang/Class
This commit is contained in:
@ -1,9 +1,23 @@
|
||||
package java.lang;
|
||||
|
||||
public final class Class <T> {
|
||||
private Object body;
|
||||
private short flags;
|
||||
private short vmFlags;
|
||||
private short fixedSize;
|
||||
private short arrayElementSize;
|
||||
private int[] objectMask;
|
||||
private byte[] name;
|
||||
private Class super_;
|
||||
private Object interfaceTable;
|
||||
private Object virtualTable;
|
||||
private Object fieldTable;
|
||||
private Object methodTable;
|
||||
private Object staticTable;
|
||||
private Object initializer;
|
||||
|
||||
private Class() { }
|
||||
|
||||
public native String getName();
|
||||
public String getName() {
|
||||
return new String(name, 0, name.length, false);
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,20 @@ public final class String {
|
||||
}
|
||||
}
|
||||
|
||||
public String(byte[] data, int offset, int length, boolean copy) {
|
||||
if (copy) {
|
||||
byte[] c = new byte[length];
|
||||
System.arraycopy(data, offset, c, 0, length);
|
||||
|
||||
this.data = c;
|
||||
this.length = length;
|
||||
} else {
|
||||
this.data = data;
|
||||
this.offset = offset;
|
||||
this.length = length;
|
||||
}
|
||||
}
|
||||
|
||||
public int length() {
|
||||
return length;
|
||||
}
|
||||
|
Reference in New Issue
Block a user