use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.
the class VMCommonLibrarySupport method setSystemStreamField.
/**
* Set the value of a static final stream field of the System class
* @param fieldName name of field to set
* @param stream value
*/
static void setSystemStreamField(String fieldName, Object stream) {
try {
RVMField field = ((RVMClass) JikesRVMSupport.getTypeForClass(System.class)).findDeclaredField(Atom.findOrCreateUnicodeAtom(fieldName));
field.setObjectValueUnchecked(null, stream);
} catch (Exception e) {
throw new Error("Error setting stream field " + fieldName + " of java.lang.System", e);
}
}
use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.
the class VMObjectStreamClass method setIntNative.
static void setIntNative(Field field, Object obj, int val) {
RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
f.setIntValueUnchecked(obj, val);
}
use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.
the class VMObjectStreamClass method setBooleanNative.
static void setBooleanNative(Field field, Object obj, boolean val) {
RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
f.setBooleanValueUnchecked(obj, val);
}
use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.
the class VMObjectStreamClass method setFloatNative.
static void setFloatNative(Field field, Object obj, float val) {
RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
f.setFloatValueUnchecked(obj, val);
}
use of org.jikesrvm.classloader.RVMField in project JikesRVM by JikesRVM.
the class VMObjectStreamClass method setShortNative.
static void setShortNative(Field field, Object obj, short val) {
RVMField f = java.lang.reflect.JikesRVMSupport.getFieldOf(field);
f.setShortValueUnchecked(obj, val);
}
Aggregations