org.apache.bcel.generic
public abstract class BranchInstruction extends Instruction implements InstructionTargeter
See Also: InstructionList
Field Summary | |
---|---|
protected int | index |
protected int | position |
protected InstructionHandle | target |
Constructor Summary | |
---|---|
protected | BranchInstruction(short opcode, InstructionHandle target) Common super constructor |
Method Summary | |
---|---|
boolean | containsTarget(InstructionHandle ih) |
void | dump(DataOutputStream out)
Dump instruction as byte code to stream out. |
int | getIndex() |
InstructionHandle | getTarget() |
protected int | getTargetOffset(InstructionHandle _target) |
protected int | getTargetOffset() |
protected void | initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file. |
void | setTarget(InstructionHandle target)
Set branch target |
String | toString(boolean verbose)
Long output format:
<position in byte code>
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")"
"<"<target instruction>">" "@"<branch target offset>
|
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) |
Parameters: opcode Instruction opcode target instruction to branch to
Returns: true, if ih is target of this instruction
Parameters: out Output stream
Returns: target offset in byte code
Returns: target of branch instruction
Parameters: _target branch target
Returns: the offset to `target' relative to this instruction
Returns: the offset to this instruction's target
Parameters: bytes input stream wide wide prefix?
See Also: InstructionList
Parameters: target branch target
Parameters: verbose long/short format switch
Returns: mnemonic for instruction
Parameters: offset additional offset caused by preceding (variable length) instructions max_offset the maximum offset that may be caused by these instructions
Returns: additional offset caused by possible change of this instruction's length
Parameters: old_ih old target new_ih new target