org.apache.bcel.generic
Class Select
- Cloneable, InstructionTargeter, Serializable, StackProducer, VariableLengthInstruction
public abstract class Select
Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
$Id: Select.java,v 1.2 2002/04/26 09:30:11 mdahm Exp $
containsTarget , dump , getIndex , getTarget , getTargetOffset , getTargetOffset , initFromFile , setTarget , toString , updatePosition , updateTarget |
accept , consumeStack , copy , dump , equals , getComparator , getLength , getName , getOpcode , initFromFile , produceStack , readInstruction , setComparator , toString , toString , toString |
fixed_length
protected int fixed_length
indices
protected int[] indices
match
protected int[] match
match_length
protected int match_length
padding
protected int padding
dump
public void dump(DataOutputStream out)
throws IOException
Dump instruction as byte code to stream out.
- dump in interface BranchInstruction
getIndices
public int[] getIndices()
- array of match target offsets
getMatchs
public int[] getMatchs()
setTarget
public void setTarget(int i,
InstructionHandle target)
Set branch target for `i'th case
updatePosition
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.
Called by InstructionList.setPositions when setting the position for every
instruction. In the presence of variable length instructions `setPositions'
performs multiple passes over the instruction list to calculate the
correct (byte) positions and offsets by calling this function.
- updatePosition in interface BranchInstruction
offset
- additional offset caused by preceding (variable length) instructionsmax_offset
- the maximum offset that may be caused by these instructions
- additional offset caused by possible change of this instruction's length