|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.classloader.AnnotatedElement org.jikesrvm.classloader.RVMMember org.jikesrvm.classloader.RVMField
public final class RVMField
A field of a java class.
Field Summary | |
---|---|
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 |
Fields inherited from class org.jikesrvm.classloader.RVMMember |
---|
memRef, modifiers, offset |
Fields inherited from class org.jikesrvm.classloader.AnnotatedElement |
---|
declaredAnnotationDatas |
Fields inherited from interface org.jikesrvm.Constants |
---|
NOT_REACHED, REFLECTION_FPRS_BITS, REFLECTION_FPRS_MASK, REFLECTION_GPRS_BITS, REFLECTION_GPRS_MASK |
Fields inherited from interface org.jikesrvm.objectmodel.ThinLockConstants |
---|
TL_DEDICATED_U16_OFFSET, TL_DEDICATED_U16_SHIFT, TL_LOCK_COUNT_MASK, TL_LOCK_COUNT_SHIFT, TL_LOCK_COUNT_UNIT, TL_LOCK_ID_MASK, TL_LOCK_ID_SHIFT, TL_NUM_BITS_RC, TL_NUM_BITS_STAT, TL_NUM_BITS_TID, TL_STAT_BIASABLE, TL_STAT_FAT, TL_STAT_MASK, TL_STAT_SHIFT, TL_STAT_THIN, TL_THREAD_ID_MASK, TL_THREAD_ID_SHIFT, TL_UNLOCK_MASK |
Fields inherited from interface org.jikesrvm.objectmodel.TIBLayoutConstants |
---|
IMT_METHOD_SLOTS, NEEDS_DYNAMIC_LINK, TIB_ARRAY_ELEMENT_TIB_INDEX, TIB_DOES_IMPLEMENT_INDEX, TIB_FIRST_SPECIALIZED_METHOD_INDEX, TIB_FIRST_VIRTUAL_METHOD_INDEX, TIB_INTERFACE_DISPATCH_TABLE_INDEX, TIB_SUPERCLASS_IDS_INDEX, TIB_TYPE_INDEX |
Fields inherited from interface org.jikesrvm.HeapLayoutConstants |
---|
BAD_MAP_COMPRESSION, BOOT_IMAGE_CODE_END, BOOT_IMAGE_CODE_SIZE, BOOT_IMAGE_CODE_START, BOOT_IMAGE_DATA_END, BOOT_IMAGE_DATA_SIZE, BOOT_IMAGE_DATA_START, BOOT_IMAGE_END, BOOT_IMAGE_RMAP_END, BOOT_IMAGE_RMAP_START, MAX_BOOT_IMAGE_RMAP_SIZE, MAXIMUM_MAPPABLE |
Constructor Summary | |
---|---|
private |
RVMField(TypeReference declaringClass,
MemberReference memRef,
short modifiers,
Atom signature,
int constantValueIndex,
RVMAnnotation[] annotations)
Create a field. |
Method Summary | |
---|---|
(package private) static RVMField |
createAnnotationField(TypeReference annotationClass,
MemberReference memRef)
Create a field for a synthetic annotation class |
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()
How many stackslots do value of this type take? |
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()
Get the value from the runtime final field |
short |
getShortValueUnchecked(Object obj)
|
int |
getSize()
How many bytes of memory words do value of this type take? |
TypeReference |
getType()
Get type of this field's value. |
Word |
getWordValueUnchecked(Object obj)
|
boolean |
isEnumConstant()
Enum constant |
boolean |
isFinal()
May only be assigned once? |
boolean |
isReferenceType()
Does the field hold a reference? |
boolean |
isRuntimeFinal()
Is the field RuntimeFinal? |
boolean |
isStatic()
Shared among all instances of this class? |
boolean |
isSynthetic()
Not present in source code file? |
boolean |
isTraced()
Does the field hold a reference? |
boolean |
isTransient()
Value not to be written/read by persistent object manager? |
boolean |
isUntraced()
Is this field invisible to the memory management system. |
boolean |
isVolatile()
Value not to be cached in a register? |
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)
Read and create 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. |
Methods inherited from class org.jikesrvm.classloader.RVMMember |
---|
getDeclaringClass, getDescriptor, getId, getMemberRef, getModifiers, getName, getOffset, getSignature, hashCode, hasOffset, isPrivate, isProtected, isPublic, setOffset, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final int constantValueIndex
private final byte size
private final boolean reference
private boolean madeTraced
Constructor Detail |
---|
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 annotationsMethod Detail |
---|
static 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 from
IOException
static RVMField createAnnotationField(TypeReference annotationClass, MemberReference memRef)
public TypeReference getType()
public int getNumberOfStackSlots()
public int getSize()
public boolean isTraced()
public boolean madeTraced()
public boolean isReferenceType()
public boolean isStatic()
public boolean isFinal()
public boolean isVolatile()
public boolean isTransient()
public boolean isSynthetic()
public boolean isEnumConstant()
public boolean isRuntimeFinal()
public boolean isUntraced()
public void makeTraced()
public boolean getRuntimeFinalValue()
int getConstantValueIndex()
public Object getObjectUnchecked(Object obj)
public 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)
private int get32Bits(Object obj)
private long get64Bits(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)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |