|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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 | |
---|---|
private static BranchHandle |
bh_list
Factory methods. |
private BranchInstruction |
bi
|
Fields inherited from class org.apache.bcel.generic.InstructionHandle |
---|
i_position, instruction, next, prev |
Constructor Summary | |
---|---|
private |
BranchHandle(BranchInstruction i)
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.bcel.generic.InstructionHandle |
---|
accept, addAttribute, addTargeter, dispose, getAttribute, getAttributes, getInstruction, getInstructionHandle, 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 |
Field Detail |
---|
private BranchInstruction bi
private static BranchHandle bh_list
Constructor Detail |
---|
private BranchHandle(BranchInstruction i)
Method Detail |
---|
static final 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 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 |