|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.classloader.MemberReference
public abstract class MemberReference
A class to represent the reference in a class file to some member (field or method). A member reference is uniquely defined by
Field Summary | |
---|---|
protected Atom |
descriptor
The descriptor |
private static ImmutableEntryHashSetRVM<MemberReference> |
dictionary
Used to canonicalize memberReferences |
protected int |
id
Unique id for the member reference (ignored in .equals comparison) |
private static int |
LOG_ROW_SIZE
2^LOG_ROW_SIZE is the number of elements per row |
private static MemberReference[][] |
members
Dictionary of all MemberReference instances. |
protected Atom |
name
The member name |
private static int |
nextId
Used to assign ids. |
private static int |
ROW_MASK
Mask to ascertain row from id number |
protected TypeReference |
type
The type reference |
Constructor Summary | |
---|---|
protected |
MemberReference(TypeReference tRef,
Atom mn,
Atom d,
int id)
|
Method Summary | |
---|---|
FieldReference |
asFieldReference()
|
MethodReference |
asMethodReference()
|
boolean |
equals(Object other)
|
static MemberReference |
findOrCreate(TypeReference tRef,
Atom mn,
Atom md)
Find or create the canonical MemberReference instance for the given tuple. |
Atom |
getDescriptor()
|
int |
getId()
|
static MemberReference |
getMemberRef(int id)
|
Atom |
getName()
|
static int |
getNextId()
|
TypeReference |
getType()
|
int |
hashCode()
|
boolean |
isFieldReference()
Is this member reference to a field? |
boolean |
isMethodReference()
Is this member reference to a method? |
boolean |
needsDynamicLink(RVMMethod that)
Is dynamic linking code required to access "this" member when referenced from "that" method? |
static MemberReference |
parse(StringTokenizer parser)
Given a StringTokenizer currently pointing to the start of a MemberReference (created by doing a toString() on a
MemberReference), parse it and find/create the appropriate
MemberReference. |
static MemberReference |
parse(StringTokenizer parser,
boolean boot)
|
RVMMember |
peekResolvedMember()
|
RVMMember |
resolveMember()
Force resolution and return the resolved member. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final ImmutableEntryHashSetRVM<MemberReference> dictionary
private static final int LOG_ROW_SIZE
private static final int ROW_MASK
private static MemberReference[][] members
private static int nextId
protected final int id
protected final TypeReference type
protected final Atom name
protected final Atom descriptor
Constructor Detail |
---|
protected MemberReference(TypeReference tRef, Atom mn, Atom d, int id)
tRef
- the type referencemn
- the field or method named
- the field or method descriptorid
- the new ID of the member were a new member required (ignored in
.equals test)Method Detail |
---|
public static MemberReference findOrCreate(TypeReference tRef, Atom mn, Atom md)
tRef
- the type referencemn
- the name of the membermd
- the descriptor of the memberpublic static MemberReference parse(StringTokenizer parser)
MemberReference
(created by doing a toString() on a
MemberReference), parse it and find/create the appropriate
MemberReference. Consumes all of the tokens corresponding to the
member reference.
public static MemberReference parse(StringTokenizer parser, boolean boot)
public static int getNextId()
public static MemberReference getMemberRef(int id)
public final TypeReference getType()
public final Atom getName()
public final Atom getDescriptor()
public final int getId()
public final boolean isFieldReference()
public final boolean isMethodReference()
public final FieldReference asFieldReference()
public final MethodReference asMethodReference()
public final RVMMember peekResolvedMember()
null
if it cannot be resolved without risking class loading.public final RVMMember resolveMember()
public final boolean needsDynamicLink(RVMMethod that)
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object other)
equals
in class Object
public final String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |