public final class FieldReference extends MemberReference
Modifier and Type | Field and Description |
---|---|
private TypeReference |
fieldContentsType
The field's type
|
private RVMField |
resolvedMember
The RVMField that this field reference resolved to (
null if not yet resolved). |
descriptor, id, name, type
Constructor and Description |
---|
FieldReference(TypeReference tr,
Atom mn,
Atom d,
int id) |
Modifier and Type | Method and Description |
---|---|
boolean |
definitelyDifferent(FieldReference that)
Do this and that definitely refer to different fields?
|
boolean |
definitelySame(FieldReference that)
Do this and that definitely refer to the same field?
|
TypeReference |
getFieldContentsType() |
int |
getNumberOfStackSlots() |
int |
getSize() |
boolean |
isResolved() |
RVMField |
peekResolvedField()
Find the RVMField that this field reference refers to using
the search order specified in JVM spec 5.4.3.2.
|
RVMField |
resolve()
Find the RVMField that this field reference refers to using
the search order specified in JVM spec 5.4.3.2.
|
private RVMField |
resolveInternal(RVMClass declaringClass) |
private RVMField |
searchInterfaceFields(RVMClass c) |
(package private) void |
setResolvedMember(RVMField it) |
asFieldReference, asMethodReference, equals, findOrCreate, getDescriptor, getFieldRef, getId, getMemberRef, getMethodRef, getName, getNextId, getType, hashCode, isFieldReference, isMethodReference, needsDynamicLink, parse, parse, peekResolvedMember, resolveMember, toString
private final TypeReference fieldContentsType
private RVMField resolvedMember
null
if not yet resolved).FieldReference(TypeReference tr, Atom mn, Atom d, int id)
tr
- a type referencemn
- the field or method named
- the field or method descriptorid
- the new ID of the member were a new member requiredpublic TypeReference getFieldContentsType()
public int getNumberOfStackSlots()
public int getSize()
public boolean definitelyDifferent(FieldReference that)
that
- the reference to compare withtrue
if the fields are definitely different, false
if it's not known (e.g. because at least one of the field references is
unresolved)public boolean definitelySame(FieldReference that)
that
- the reference to compare withtrue
if the fields are definitely the same, false
if it's not known (e.g. because at least one of the field references is
unresolved)public boolean isResolved()
true
if the field reference already been resolved into a target methodvoid setResolvedMember(RVMField it)
public RVMField peekResolvedField()
public RVMField resolve()
private RVMField resolveInternal(RVMClass declaringClass)
private RVMField searchInterfaceFields(RVMClass c)