public class BytecodePosition extends Object
Modifier and Type | Field and Description |
---|---|
private int |
bci |
private BytecodePosition |
caller |
private ResolvedJavaMethod |
method |
Constructor and Description |
---|
BytecodePosition(BytecodePosition caller,
ResolvedJavaMethod method,
int bci)
Constructs a new object representing a given parent/caller, a given method, and a given BCI.
|
Modifier and Type | Method and Description |
---|---|
BytecodePosition |
addCaller(BytecodePosition link)
Adds a caller to the current position returning the new position.
|
boolean |
equals(Object obj)
Deep equality test.
|
int |
getBCI() |
BytecodePosition |
getCaller()
The position where this position has been called,
null if none. |
ResolvedJavaMethod |
getMethod() |
int |
hashCode() |
String |
toString()
Converts this code position to a string representation.
|
private final BytecodePosition caller
private final ResolvedJavaMethod method
private final int bci
public BytecodePosition(BytecodePosition caller, ResolvedJavaMethod method, int bci)
caller
- the parent positionmethod
- the methodbci
- a BCI within the methodpublic int getBCI()
-1
may be
used to indicate the location is unknown, for example within code synthesized by the
compiler.public ResolvedJavaMethod getMethod()
public BytecodePosition getCaller()
null
if none.public BytecodePosition addCaller(BytecodePosition link)