|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.bcel.generic.Instruction org.apache.bcel.generic.BranchInstruction org.apache.bcel.generic.Select
public abstract class Select
Select - Abstract super class for LOOKUPSWITCH and TABLESWITCH instructions.
We use our super's target
property as the default target.
LOOKUPSWITCH
,
TABLESWITCH
,
InstructionList
,
Serialized FormField Summary | |
---|---|
protected int |
fixed_length
|
protected int[] |
indices
|
protected int[] |
match
|
protected int |
match_length
|
protected int |
padding
|
protected InstructionHandle[] |
targets
|
Fields inherited from class org.apache.bcel.generic.BranchInstruction |
---|
index, position, target |
Fields inherited from class org.apache.bcel.generic.Instruction |
---|
length, opcode |
Method Summary | |
---|---|
protected Object |
clone()
|
boolean |
containsTarget(InstructionHandle ih)
|
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. |
void |
setTarget(int i,
InstructionHandle target)
Set branch target for `i'th case |
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)
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)
|
Methods inherited from class org.apache.bcel.generic.BranchInstruction |
---|
getIndex, getTarget, getTargetOffset, getTargetOffset, setTarget |
Methods inherited from class org.apache.bcel.generic.Instruction |
---|
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, produceStack, readInstruction, setComparator, toString, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.bcel.generic.StackProducer |
---|
produceStack |
Field Detail |
---|
protected int[] match
protected int[] indices
protected InstructionHandle[] targets
protected int fixed_length
protected int match_length
protected int padding
Method Detail |
---|
protected int updatePosition(int offset, int max_offset)
updatePosition
in class BranchInstruction
offset
- additional offset caused by preceding (variable length) instructionsmax_offset
- the maximum offset that may be caused by these instructions
public void dump(DataOutputStream out) throws IOException
dump
in class BranchInstruction
out
- Output stream
IOException
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
initFromFile
in class BranchInstruction
bytes
- input streamwide
- wide prefix?
IOException
InstructionList
public String toString(boolean verbose)
BranchInstruction
toString
in class BranchInstruction
verbose
- long/short format switch
public void setTarget(int i, InstructionHandle target)
public void updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
updateTarget
in interface InstructionTargeter
updateTarget
in class BranchInstruction
old_ih
- old targetnew_ih
- new targetpublic boolean containsTarget(InstructionHandle ih)
containsTarget
in interface InstructionTargeter
containsTarget
in class BranchInstruction
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public int[] getMatchs()
public int[] getIndices()
public InstructionHandle[] getTargets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |