org.apache.bcel.generic
Class BranchHandle
- java.lang.Object
-
- org.apache.bcel.generic.InstructionHandle
-
- org.apache.bcel.generic.BranchHandle
-
public final class BranchHandle extends InstructionHandle
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().- See Also:
InstructionHandle,Instruction,InstructionList
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetPosition()InstructionHandlegetTarget()voidsetInstruction(Instruction i)Set new contents.voidsetTarget(InstructionHandle ih)Pass new target to instruction.voidupdateTarget(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
-
-
-
-
Method Detail
-
getPosition
public int getPosition()
- Overrides:
getPositionin classInstructionHandle- Returns:
- the position, i.e., the byte code offset of the contained instruction. This is accurate only after InstructionList.setPositions() has been called.
-
setTarget
public void setTarget(InstructionHandle ih)
Pass new target to instruction.
-
updateTarget
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
Update target of instruction.
-
getTarget
public InstructionHandle getTarget()
- Returns:
- target of instruction.
-
setInstruction
public void setInstruction(Instruction i)
Set new contents. Old instruction is disposed and may not be used anymore.- Overrides:
setInstructionin classInstructionHandle
-
-
DataMelt 3.0 © DataMelt by jWork.ORG