public class TableSwitchInstruction extends JumpInstruction
tableswitch instruction.| Modifier and Type | Method and Description |
|---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a
BCVisitor, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
TableSwitchInstruction |
addTarget(Instruction target)
Add a target to this switch.
|
int |
getDefaultOffset()
Synonymous with
JumpInstruction.getOffset(). |
Instruction |
getDefaultTarget()
Synonymous with
JumpInstruction.getTarget(). |
int |
getHigh() |
int |
getLow() |
int[] |
getOffsets()
Returns the current byte offsets for the different
switch cases in this Instruction.
|
int |
getStackChange()
Return the number of stack positions this instruction pushes
or pops during its execution.
|
Instruction[] |
getTargets()
Return the targets for this switch, or empty array if not set.
|
void |
replaceTarget(Instruction oldTarget,
Instruction newTarget)
Replace the given old, likely invalid, target with a new target.
|
TableSwitchInstruction |
setDefaultOffset(int offset)
Synonymous with
JumpInstruction.setOffset(int). |
TableSwitchInstruction |
setDefaultTarget(Instruction ins)
Synonymous with
JumpInstruction.setTarget(serp.bytecode.Instruction). |
TableSwitchInstruction |
setHigh(int high) |
TableSwitchInstruction |
setLow(int low) |
void |
setOffsets(int[] offsets)
Sets the offsets for the instructions representing the different
switch statement cases.
|
TableSwitchInstruction |
setTargets(Instruction[] targets)
Set the jump points for this switch.
|
void |
updateTargets()
Use the byte indexes read from the class file to calculate and
set references to the target instruction(s) for this ptr.
|
equalsInstruction, getOffset, getTarget, setOffset, setTargetgetByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, isValidclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCodepublic int[] getOffsets()
public void setOffsets(int[] offsets)
public Instruction getDefaultTarget()
JumpInstruction.getTarget().public TableSwitchInstruction setDefaultTarget(Instruction ins)
JumpInstruction.setTarget(serp.bytecode.Instruction).public int getDefaultOffset()
JumpInstruction.getOffset().public TableSwitchInstruction setDefaultOffset(int offset)
JumpInstruction.setOffset(int).public int getLow()
public TableSwitchInstruction setLow(int low)
public int getHigh()
public TableSwitchInstruction setHigh(int high)
public Instruction[] getTargets()
public TableSwitchInstruction setTargets(Instruction[] targets)
public TableSwitchInstruction addTarget(Instruction target)
public int getStackChange()
InstructiongetStackChange in class Instructionpublic void updateTargets()
InstructionPtrupdateTargets in interface InstructionPtrupdateTargets in class JumpInstructionpublic void replaceTarget(Instruction oldTarget, Instruction newTarget)
InstructionPtrreplaceTarget in interface InstructionPtrreplaceTarget in class JumpInstructionpublic void acceptVisit(BCVisitor visit)
VisitAcceptorBCVisitor, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.acceptVisit in interface VisitAcceptoracceptVisit in class JumpInstructionCopyright © 2002-2013. All Rights Reserved.