mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
add classes and methods needed for GNU Classpath compatibility
Most of these methods are stubs which throw UnsupportedOperationExceptions for now.
This commit is contained in:
@ -101,6 +101,38 @@ public class Field<T> extends AccessibleObject {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getBoolean(Object instance) throws IllegalAccessException {
|
||||
return ((Boolean) get(instance)).booleanValue();
|
||||
}
|
||||
|
||||
public byte getByte(Object instance) throws IllegalAccessException {
|
||||
return ((Byte) get(instance)).byteValue();
|
||||
}
|
||||
|
||||
public short getShort(Object instance) throws IllegalAccessException {
|
||||
return ((Short) get(instance)).shortValue();
|
||||
}
|
||||
|
||||
public char getChar(Object instance) throws IllegalAccessException {
|
||||
return ((Character) get(instance)).charValue();
|
||||
}
|
||||
|
||||
public int getInt(Object instance) throws IllegalAccessException {
|
||||
return ((Integer) get(instance)).intValue();
|
||||
}
|
||||
|
||||
public float getFloat(Object instance) throws IllegalAccessException {
|
||||
return ((Float) get(instance)).floatValue();
|
||||
}
|
||||
|
||||
public long getLong(Object instance) throws IllegalAccessException {
|
||||
return ((Long) get(instance)).longValue();
|
||||
}
|
||||
|
||||
public double getDouble(Object instance) throws IllegalAccessException {
|
||||
return ((Double) get(instance)).doubleValue();
|
||||
}
|
||||
|
||||
public void set(Object instance, Object value)
|
||||
throws IllegalAccessException
|
||||
{
|
||||
@ -162,6 +194,10 @@ public class Field<T> extends AccessibleObject {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isEnumConstant() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private static native long getPrimitive
|
||||
(Object instance, int code, int offset);
|
||||
|
||||
|
Reference in New Issue
Block a user