* boxed. Other types are implementations of JavaObject, or null.
*/
@Override
public Object get(JavaObject arg0) throws CorruptDataException,
MemoryAccessException {
StaticFieldEntry field = (StaticFieldEntry) this.field;
switch(field.getType()){
case BasicType.OBJECT:
return heap.getObjectByID(field.getIDField());
case BasicType.BOOLEAN:
return new Boolean(field.getBooleanField());
case BasicType.CHAR:
return new Character(field.getCharField());
case BasicType.FLOAT:
return new Float(field.getFloatField());
case BasicType.DOUBLE:
return new Double(field.getDoubleField());
case BasicType.BYTE:
return new Byte(field.getByteField());
case BasicType.SHORT:
return new Short(field.getShortField());
case BasicType.INT:
return new Integer(field.getIntegerField());
case BasicType.LONG:
return new Long(field.getLongField());
default:
throw new CorruptDataException(new CorruptDataImpl("Unexpected basic type of " + field.getType()+
"encountered."));
}
}