|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.bcel.generic.InstructionHandle org.apache.bcel.generic.BranchHandle
public final class BranchHandle
BranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended. This is useful when the target of this instruction is not known at time of creation and must be set later via setTarget().
InstructionHandle
,
Instruction
,
InstructionList
,
Serialized FormField Summary |
---|
Fields inherited from class org.apache.bcel.generic.InstructionHandle |
---|
i_position |
Method Summary | |
---|---|
protected void |
addHandle()
Handle adds itself to the list of resuable handles. |
int |
getPosition()
|
InstructionHandle |
getTarget()
|
void |
setInstruction(Instruction i)
Set new contents. |
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. |
Methods inherited from class org.apache.bcel.generic.InstructionHandle |
---|
accept, addAttribute, addTargeter, getAttribute, getAttributes, getInstruction, getNext, getPrev, getTargeters, hasTargeters, removeAllTargeters, removeAttribute, removeTargeter, swapInstruction, toString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
protected void addHandle()
addHandle
in class InstructionHandle
public int getPosition()
getPosition
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 instructions
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |