make builtin class type a bootstrap version of java/lang/Class

This commit is contained in:
Joel Dice
2007-07-12 17:46:08 -06:00
parent 69eed6ba5a
commit 0099aa396b
7 changed files with 72 additions and 18 deletions

View File

@ -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);
}
}

View File

@ -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;
}