public class LookupSwitchInstruction extends JumpInstruction
lookupswitch
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. |
LookupSwitchInstruction |
addCase(int match,
Instruction target)
Add a case to this switch.
|
int |
getDefaultOffset()
Synonymous with
JumpInstruction.getOffset() . |
Instruction |
getDefaultTarget()
Synonymous with
JumpInstruction.getTarget() . |
int[] |
getMatches()
Return the values of the case statements for this switch.
|
int[] |
getOffsets() |
int |
getStackChange()
Return the number of stack positions this instruction pushes
or pops during its execution.
|
Instruction[] |
getTargets()
Return the targets of the case statements for this switch.
|
void |
replaceTarget(Instruction oldTarget,
Instruction newTarget)
Replace the given old, likely invalid, target with a new target.
|
LookupSwitchInstruction |
setCases(int[] matches,
Instruction[] targets)
Set the match-jumppt pairs for this switch.
|
LookupSwitchInstruction |
setDefaultOffset(int offset)
Synonymous with
JumpInstruction.setOffset(int) . |
LookupSwitchInstruction |
setDefaultTarget(Instruction ins)
Synonymous with
JumpInstruction.setTarget(serp.bytecode.Instruction) . |
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, setTarget
getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCode
public int getStackChange()
Instruction
getStackChange
in class Instruction
public Instruction getDefaultTarget()
JumpInstruction.getTarget()
.public LookupSwitchInstruction setDefaultTarget(Instruction ins)
JumpInstruction.setTarget(serp.bytecode.Instruction)
.public int getDefaultOffset()
JumpInstruction.getOffset()
.public LookupSwitchInstruction setDefaultOffset(int offset)
JumpInstruction.setOffset(int)
.public LookupSwitchInstruction setCases(int[] matches, Instruction[] targets)
public int[] getOffsets()
public int[] getMatches()
public Instruction[] getTargets()
public LookupSwitchInstruction addCase(int match, Instruction target)
public void updateTargets()
InstructionPtr
updateTargets
in interface InstructionPtr
updateTargets
in class JumpInstruction
public void replaceTarget(Instruction oldTarget, Instruction newTarget)
InstructionPtr
replaceTarget
in interface InstructionPtr
replaceTarget
in class JumpInstruction
public void acceptVisit(BCVisitor visit)
VisitAcceptor
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.acceptVisit
in interface VisitAcceptor
acceptVisit
in class JumpInstruction
Copyright © 2002–2019. All rights reserved.