public final class RVMField extends RVMMember
Modifier and Type | Field and Description |
---|---|
private int |
constantValueIndex
constant pool index of field's value (0 --> not a "static final constant")
|
private boolean |
madeTraced
Has the field been made traced?
|
private boolean |
reference
Does the field hold a reference value?
|
private byte |
size
The size of the field in bytes
|
declaredAnnotationDatas
Modifier | Constructor and Description |
---|---|
private |
RVMField(TypeReference declaringClass,
MemberReference memRef,
short modifiers,
Atom signature,
int constantValueIndex,
RVMAnnotation[] annotations)
Create a field.
|
Modifier and Type | Method and Description |
---|---|
(package private) static RVMField |
createAnnotationField(TypeReference annotationClass,
MemberReference memRef) |
private int |
get32Bits(Object obj) |
private long |
get64Bits(Object obj) |
Address |
getAddressValueUnchecked(Object obj) |
boolean |
getBooleanValueUnchecked(Object obj) |
byte |
getByteValueUnchecked(Object obj) |
char |
getCharValueUnchecked(Object obj) |
(package private) int |
getConstantValueIndex()
Get index of constant pool entry containing this
"static final constant" field's value.
|
double |
getDoubleValueUnchecked(Object obj) |
Extent |
getExtentValueUnchecked(Object obj) |
float |
getFloatValueUnchecked(Object obj) |
int |
getIntValueUnchecked(Object obj) |
long |
getLongValueUnchecked(Object obj) |
int |
getNumberOfStackSlots() |
Object |
getObjectUnchecked(Object obj)
Read the contents of the field.
|
Object |
getObjectValueUnchecked(Object obj)
Read one object ref from heap using RVM object model, GC safe.
|
Offset |
getOffsetValueUnchecked(Object obj) |
boolean |
getRuntimeFinalValue()
Gets the value from the runtime final field.
|
short |
getShortValueUnchecked(Object obj) |
int |
getSize() |
TypeReference |
getType() |
Word |
getWordValueUnchecked(Object obj) |
boolean |
isEnumConstant() |
boolean |
isFinal() |
boolean |
isReferenceType() |
boolean |
isRuntimeFinal()
Is the field RuntimeFinal?
|
boolean |
isStatic() |
boolean |
isSynthetic() |
boolean |
isTraced()
Does the field hold a reference?
|
boolean |
isTransient() |
boolean |
isUntraced() |
boolean |
isVolatile() |
boolean |
madeTraced()
Does the field hold a made-traced reference?
|
void |
makeTraced()
Make this field a traced field by garbage collection.
|
(package private) static RVMField |
readField(TypeReference declaringClass,
int[] constantPool,
MemberReference memRef,
short modifiers,
DataInputStream input)
Reads and creates a field.
|
void |
setAddressValueUnchecked(Object obj,
Address ref) |
void |
setBooleanValueUnchecked(Object obj,
boolean b) |
void |
setByteValueUnchecked(Object obj,
byte b) |
void |
setCharValueUnchecked(Object obj,
char c) |
void |
setDoubleValueUnchecked(Object obj,
double d) |
void |
setExtentValueUnchecked(Object obj,
Extent ref) |
void |
setFloatValueUnchecked(Object obj,
float f) |
void |
setIntValueUnchecked(Object obj,
int i) |
void |
setLongValueUnchecked(Object obj,
long l) |
void |
setObjectValueUnchecked(Object obj,
Object ref)
assign one object ref from heap using RVM object model, GC safe.
|
void |
setOffsetValueUnchecked(Object obj,
Offset ref) |
void |
setShortValueUnchecked(Object obj,
short i) |
void |
setWordValueUnchecked(Object obj,
Word ref)
assign one object ref from heap using RVM object model, GC safe.
|
getDeclaringClass, getDescriptor, getId, getMemberRef, getModifiers, getName, getOffset, getSignature, hashCode, hasOffset, isPrivate, isProtected, isPublic, setOffset, toString
getAnnotation, getAnnotations, getAnnotationsInternal, getDeclaredAnnotations, getDeclaredAnnotationsInternal, hasAnnotations, hasBaselineNoRegistersAnnotation, hasBaselineSaveLSRegistersAnnotation, hasInlineAnnotation, hasInterruptibleAnnotation, hasLogicallyUninterruptibleAnnotation, hasNoBoundsCheckAnnotation, hasNoCheckStoreAnnotation, hasNoEscapesAnnotation, hasNoInlineAnnotation, hasNonMovingAllocationAnnotation, hasNonMovingAnnotation, hasNoNullCheckAnnotation, hasNoOptCompileAnnotation, hasPreemptibleAnnotation, hasPureAnnotation, hasRuntimeFinalAnnotation, hasRuntimePureAnnotation, hasUninterruptibleAnnotation, hasUninterruptibleNoWarnAnnotation, hasUnpreemptibleAnnotation, hasUnpreemptibleNoWarnAnnotation, hasUntracedAnnotation, isAnnotationDeclared, isAnnotationPresent, readAnnotations, toAnnotations
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
private final int constantValueIndex
private final byte size
private final boolean reference
private boolean madeTraced
private RVMField(TypeReference declaringClass, MemberReference memRef, short modifiers, Atom signature, int constantValueIndex, RVMAnnotation[] annotations)
declaringClass
- the TypeReference object of the class
that declared this fieldmemRef
- the canonical memberReference for this member.modifiers
- modifiers associated with this field.signature
- generic type of this field.constantValueIndex
- constant pool index of constant valueannotations
- array of runtime visible annotationsstatic RVMField readField(TypeReference declaringClass, int[] constantPool, MemberReference memRef, short modifiers, DataInputStream input) throws IOException
RVMClass
is allowed to
create an instance of a RVMField.declaringClass
- the TypeReference object of the class
that declared this fieldconstantPool
- the constant pool of the class loading this fieldmemRef
- the canonical memberReference for this member.modifiers
- modifiers associated with this member.input
- the DataInputStream to read the field's attributed fromIOException
- when a skip is shorter than expectedstatic RVMField createAnnotationField(TypeReference annotationClass, MemberReference memRef)
public TypeReference getType()
public int getNumberOfStackSlots()
public int getSize()
public boolean isTraced()
true
if this field needs to be traced by the garbage collectorpublic boolean madeTraced()
true
if this field was made tracedpublic boolean isReferenceType()
true
if this field holds a referencepublic boolean isStatic()
true
if this field is shared among all instances of this classpublic boolean isFinal()
true
if this field may only be assigned oncepublic boolean isVolatile()
true
if the value of this field may not be cached in a registerpublic boolean isTransient()
true
if this field's value is not to be written/read by persistent object managerpublic boolean isSynthetic()
true
if this field is not present in source code filepublic boolean isEnumConstant()
true
if this field is an enum constantpublic boolean isRuntimeFinal()
public boolean isUntraced()
true
if this this field is invisible to the memory
management system.public void makeTraced()
public boolean getRuntimeFinalValue()
int getConstantValueIndex()
public Object getObjectUnchecked(Object obj)
obj
- the object whose field is to be readpublic Object getObjectValueUnchecked(Object obj)
obj
- the object whose field is to be read,
or null
if the field is static.public Word getWordValueUnchecked(Object obj)
public Address getAddressValueUnchecked(Object obj)
public Offset getOffsetValueUnchecked(Object obj)
public Extent getExtentValueUnchecked(Object obj)
public boolean getBooleanValueUnchecked(Object obj)
public byte getByteValueUnchecked(Object obj)
public char getCharValueUnchecked(Object obj)
public short getShortValueUnchecked(Object obj)
public int getIntValueUnchecked(Object obj)
public long getLongValueUnchecked(Object obj)
public float getFloatValueUnchecked(Object obj)
public double getDoubleValueUnchecked(Object obj)
public void setObjectValueUnchecked(Object obj, Object ref)
obj
- the object whose field is to be modified, or null if the field is static.ref
- the object reference to be assigned.public void setWordValueUnchecked(Object obj, Word ref)
obj
- the object whose field is to be modified, or null if the field is static.ref
- the object reference to be assigned.public void setAddressValueUnchecked(Object obj, Address ref)
public void setExtentValueUnchecked(Object obj, Extent ref)
public void setOffsetValueUnchecked(Object obj, Offset ref)
public void setBooleanValueUnchecked(Object obj, boolean b)
public void setByteValueUnchecked(Object obj, byte b)
public void setCharValueUnchecked(Object obj, char c)
public void setShortValueUnchecked(Object obj, short i)
public void setIntValueUnchecked(Object obj, int i)
public void setFloatValueUnchecked(Object obj, float f)
public void setLongValueUnchecked(Object obj, long l)
public void setDoubleValueUnchecked(Object obj, double d)