|
|||||||||
| 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 define 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 class com.ibm.wala.classLoader.ProgramCounter |
|---|
NO_SOURCE_LINE_NUMBER |
| Constructor Summary | |
|---|---|
protected |
CallSiteReference(int programCounter,
MethodReference declaredTarget)
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
A Program Counter value is enough to uniquely identify a call site reference within a method. |
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)
|
int |
hashCode()
|
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 |
|---|
getProgramCounter |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected CallSiteReference(int programCounter,
MethodReference declaredTarget)
programCounter - Index into bytecode describing this instructiondeclaredTarget - The method target as declared at the call site| Method Detail |
|---|
public int hashCode()
hashCode in class ProgramCounterpublic boolean equals(java.lang.Object obj)
ProgramCounter
equals in class ProgramCounterObject.equals(Object)
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 ProgramCounterprotected java.lang.String getInvocationString(IInvokeInstruction.IDispatch 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 | ||||||||