org.apache.bcel.generic
public abstract class Select extends BranchInstruction implements VariableLengthInstruction, StackProducer
We use our super's target property as the default target.
Version: $Id: Select.java 386056 2006-03-15 11:31:56Z tcurdt $
See Also: LOOKUPSWITCH TABLESWITCH InstructionList
| Field Summary | |
|---|---|
| protected int | fixed_length |
| protected int[] | indices |
| protected int[] | match |
| protected int | match_length |
| protected int | padding |
| protected InstructionHandle[] | targets |
| Constructor Summary | |
|---|---|
| Select()
Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). | |
| Select(short opcode, int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)
(Match, target) pairs for switch.
| |
| Method Summary | |
|---|---|
| protected Object | clone() |
| boolean | containsTarget(InstructionHandle ih) |
| void | dispose()
Inform targets that they're not targeted anymore. |
| void | dump(DataOutputStream out)
Dump instruction as byte code to stream out. |
| int[] | getIndices() |
| int[] | getMatchs() |
| InstructionHandle[] | getTargets() |
| protected void | initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file. |
| void | setTarget(int i, InstructionHandle target)
Set branch target for `i'th case |
| String | toString(boolean verbose) |
| protected int | updatePosition(int offset, int max_offset)
Since this is a variable length instruction, it may shift the following
instructions which then need to update their position.
|
| void | updateTarget(InstructionHandle old_ih, InstructionHandle new_ih) |
Parameters: match array of matching values targets instruction targets defaultTarget default instruction target
Returns: true, if ih is target of this instruction
Parameters: out Output stream
Returns: array of match target offsets
Returns: array of match indices
Returns: array of match targets
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