public final class BranchHandle extends InstructionHandle
InstructionHandle
,
Instruction
,
InstructionList
Modifier and Type | Field and Description |
---|---|
private static BranchHandle |
bh_list
Factory methods.
|
private BranchInstruction |
bi |
i_position
Modifier | Constructor and Description |
---|---|
private |
BranchHandle(BranchInstruction i) |
Modifier and Type | Method and Description |
---|---|
protected void |
addHandle()
Handle adds itself to the list of resuable handles.
|
(package private) static BranchHandle |
getBranchHandle(BranchInstruction i) |
int |
getPosition() |
InstructionHandle |
getTarget() |
void |
setInstruction(Instruction i)
Set new contents.
|
(package private) void |
setPosition(int pos)
Set the position, i.e., the byte code offset of the contained
instruction.
|
void |
setTarget(InstructionHandle ih)
Pass new target to instruction.
|
protected int |
updatePosition(int offset,
int max_offset)
Called by InstructionList.setPositions when setting the position for every
instruction.
|
void |
updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih)
Update target of instruction.
|
accept, addAttribute, addTargeter, dispose, getAttribute, getAttributes, getInstruction, getInstructionHandle, getNext, getPrev, getTargeters, hasTargeters, removeAllTargeters, removeAttribute, removeTargeter, setNext, setPrev, swapInstruction, toString, toString
private BranchInstruction bi
private static BranchHandle bh_list
private BranchHandle(BranchInstruction i)
static BranchHandle getBranchHandle(BranchInstruction i)
protected void addHandle()
addHandle
in class InstructionHandle
public int getPosition()
getPosition
in class InstructionHandle
void setPosition(int pos)
InstructionHandle
setPosition
in class InstructionHandle
protected int updatePosition(int offset, int max_offset)
InstructionHandle
updatePosition
in class InstructionHandle
offset
- additional offset caused by preceding (variable length) instructionsmax_offset
- the maximum offset that may be caused by these instructionspublic void setTarget(InstructionHandle ih)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
public InstructionHandle getTarget()
public void setInstruction(Instruction i)
setInstruction
in class InstructionHandle