com.ibm.wala.classLoader
Class ProgramCounter
java.lang.Object
com.ibm.wala.classLoader.ProgramCounter
- Direct Known Subclasses:
- CallSiteReference, NewSiteReference
public class ProgramCounter
- extends java.lang.Object
Simple object that represents a program counter value (i.e., an instruction in the bytecode)
|
Field Summary |
static int |
NO_SOURCE_LINE_NUMBER
A constant indicating no source line number information is available. |
|
Method Summary |
boolean |
equals(java.lang.Object obj)
A Program Counter value is enough to uniquely identify a call site reference within a method. |
int |
getProgramCounter()
Return the program counter (index into the method's bytecode) for this call site. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NO_SOURCE_LINE_NUMBER
public static final int NO_SOURCE_LINE_NUMBER
- A constant indicating no source line number information is available.
- See Also:
- Constant Field Values
ProgramCounter
public ProgramCounter(int programCounter)
- Parameters:
programCounter - Index into bytecode describing this instruction
getProgramCounter
public int getProgramCounter()
- Return the program counter (index into the method's bytecode) for this call site.
- Returns:
- the program counter (index into the method's bytecode) for this call site.
equals
public boolean equals(java.lang.Object obj)
- A Program Counter value is enough to uniquely identify a call site reference within a method.
Note: must use these objects with extreme care; this only works if you never mix ProgramLocations from different methods in the
same collection.
- Overrides:
equals in class java.lang.Object
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object