|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.classloader.MemberReference org.jikesrvm.classloader.MethodReference
public final class MethodReference
A class to represent the reference in a class file to a method of that class or interface.
Field Summary | |
---|---|
private TypeReference[] |
parameterTypes
types of parameters (not including "this", if virtual) |
private RVMMethod |
resolvedMember
The RVMMethod that this method reference resolved to (null if not yet resolved). |
private TypeReference |
returnType
type of return value |
Fields inherited from class org.jikesrvm.classloader.MemberReference |
---|
descriptor, id, name, type |
Constructor Summary | |
---|---|
MethodReference(TypeReference tr,
Atom mn,
Atom d,
int id)
|
Method Summary | |
---|---|
boolean |
definitelyDifferent(MethodReference that)
Do this and that definitely refer to the different methods? |
boolean |
definitelySame(MethodReference that)
Do this and that definitely refer to the same method? |
static MethodReference |
findOrCreate(TypeReference tRef,
Atom mn,
Atom md)
Find or create a method reference |
TypeReference[] |
getParameterTypes()
|
int |
getParameterWords()
Space required by method for its parameters, in words. |
RVMMethod |
getResolvedMember()
Get the member this reference has been resolved to, if it has already been resolved. |
TypeReference |
getReturnType()
|
boolean |
isMagic()
Is the method reference to a magic method? |
boolean |
isMiranda()
Return true iff this member reference refers to a method which
is declared as part of an abstract class but actually is an
interface method, known formally as a "miranda method". |
boolean |
isResolved()
Has the method reference already been resolved into a target method? |
boolean |
isSpecializedInvoke()
Is the method reference to a specialized invoke? |
boolean |
isSysCall()
Is the method reference to a magic method? |
RVMMethod |
peekInterfaceMethod()
Find the RVMMethod that this member reference refers to using the search order specified in JVM spec 5.4.3.4. |
RVMMethod |
peekResolvedMethod()
Find the RVMMethod that this method reference refers to using the search order specified in JVM spec 5.4.3.3. |
RVMMethod |
resolve()
Find the RVMMethod that this field reference refers to using the search order specified in JVM specification 5.4.3.3. |
RVMMethod |
resolveInterfaceMethod()
Find the RVMMethod that this member reference refers to using the search order specified in JVM spec 5.4.3.4. |
private RVMMethod |
resolveInterfaceMethodInternal(RVMClass declaringClass)
Find the RVMMethod that this member reference refers to using the search order specified in JVM spec 5.4.3.4. |
private RVMMethod |
resolveInternal(RVMClass declaringClass)
Find the RVMMethod that this member reference refers to using the search order specified in JVM spec 5.4.3.3. |
RVMMethod |
resolveInvokeSpecial()
Resolve the method reference for an invoke special into a target method, if that is possible without causing classloading. |
private RVMMethod |
searchInterfaceMethods(RVMClass c)
|
(package private) void |
setResolvedMember(RVMMethod it)
For use by RVMMethod constructor |
Methods inherited from class org.jikesrvm.classloader.MemberReference |
---|
asFieldReference, asMethodReference, equals, getDescriptor, getId, getMemberRef, getName, getNextId, getType, hashCode, isFieldReference, isMethodReference, needsDynamicLink, parse, parse, peekResolvedMember, resolveMember, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final TypeReference returnType
private final TypeReference[] parameterTypes
private RVMMethod resolvedMember
Constructor Detail |
---|
MethodReference(TypeReference tr, Atom mn, Atom d, int id)
tr
- a type reference to the defining class in which this method
appears. (e.g., "Ljava/lang/String;")mn
- the name of this method (e.g., "equals")d
- the method descriptor (e.g., "(Ljava/lang/Object;)Z")id
- the new ID of the member were a new member requiredMethod Detail |
---|
public static MethodReference findOrCreate(TypeReference tRef, Atom mn, Atom md)
MemberReference.findOrCreate(TypeReference, Atom, Atom)
public TypeReference getReturnType()
public TypeReference[] getParameterTypes()
public int getParameterWords()
public boolean definitelyDifferent(MethodReference that)
public boolean definitelySame(MethodReference that)
public boolean isResolved()
public RVMMethod getResolvedMember()
void setResolvedMember(RVMMethod it)
public RVMMethod resolveInvokeSpecial()
null
if the method cannot be resolved without classloading.public RVMMethod peekResolvedMethod()
null
if it cannot be resolved.public RVMMethod resolve()
public boolean isMiranda()
true
iff this member reference refers to a method which
is declared as part of an abstract class but actually is an
interface method, known formally as a "miranda method".
This method is necessary to handle the special case where an invokevirtual is defined on an abstract class, where the method invocation points to a method inherited from an interface.
true
iff this member method reference is a miranda methodpublic boolean isMagic()
public boolean isSpecializedInvoke()
public boolean isSysCall()
private RVMMethod resolveInternal(RVMClass declaringClass)
public RVMMethod peekInterfaceMethod()
null
if it cannot be resolved without trigering class loadingpublic RVMMethod resolveInterfaceMethod() throws IncompatibleClassChangeError, NoSuchMethodError
IncompatibleClassChangeError
NoSuchMethodError
private RVMMethod resolveInterfaceMethodInternal(RVMClass declaringClass)
null
for errorprivate RVMMethod searchInterfaceMethods(RVMClass c)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |