|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.classLoader.ProgramCounter
com.ibm.wala.classLoader.CallSiteReference
public abstract class CallSiteReference
Simple object that represents a static call site (ie., an invoke instruction in the bytecode) Note that the identity of a call site reference depends on two things: the program counter, and the containing IR. Thus, it suffices to defines equals() and hashCode() from ProgramCounter, since this class does not maintain a pointer to the containing IR (or CGNode) anyway. If using a hashtable of CallSiteReference from different IRs, you probably want to use a wrapper which also holds a pointer to the governing CGNode.
| Field Summary |
|---|
| Fields inherited from interface com.ibm.wala.classLoader.IProgramCounter |
|---|
NO_SOURCE_LINE_NUMBER |
| Constructor Summary | |
|---|---|
protected |
CallSiteReference(int programCounter,
MethodReference declaredTarget)
|
| Method Summary | |
|---|---|
MethodReference |
getDeclaredTarget()
Return the Method that this call site calls. |
abstract IInvokeInstruction.IDispatch |
getInvocationCode()
Return one of INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, or INVOKEINTERFACE |
java.lang.String |
getInvocationString()
|
protected java.lang.String |
getInvocationString(IInvokeInstruction.IDispatch invocationCode)
Method getInvocationString. |
boolean |
isDispatch()
|
boolean |
isFixed()
|
boolean |
isInterface()
Is this an invokeinterface call site? |
boolean |
isSpecial()
Is this an invokespecial call site? |
boolean |
isStatic()
Is this an invokestatic call site? |
boolean |
isVirtual()
Is this an invokevirtual call site? |
static CallSiteReference |
make(int programCounter,
MethodReference declaredTarget,
IInvokeInstruction.IDispatch invocationCode)
This factory method plays a little game to avoid storing the invocation code in the object; this saves a byte (probably actually a whole word) in each created object. |
java.lang.String |
toString()
|
| Methods inherited from class com.ibm.wala.classLoader.ProgramCounter |
|---|
equals, getProgramCounter, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected CallSiteReference(int programCounter,
MethodReference declaredTarget)
programCounter - declaredTarget - | Method Detail |
|---|
public static CallSiteReference make(int programCounter,
MethodReference declaredTarget,
IInvokeInstruction.IDispatch invocationCode)
public MethodReference getDeclaredTarget()
public abstract IInvokeInstruction.IDispatch getInvocationCode()
public java.lang.String toString()
toString in class ProgramCounterObject.toString()protected java.lang.String getInvocationString(IInvokeInstruction.IDispatch invocationCode)
invocationCode -
public java.lang.String getInvocationString()
public final boolean isInterface()
public final boolean isVirtual()
public final boolean isSpecial()
public boolean isStatic()
public boolean isFixed()
public boolean isDispatch()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||