public abstract class JumpInstruction extends Instruction implements InstructionPtr
go2, jsr
, etc.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. |
boolean |
equalsInstruction(Instruction other)
JumpInstructions are equal if they represent the same operation and
the instruction they jump to is the
same, or if the jump Instruction of either is unset.
|
int |
getOffset() |
Instruction |
getTarget()
Get the current target instruction to jump to, if it has been set.
|
void |
replaceTarget(Instruction oldTarget,
Instruction newTarget)
Replace the given old, likely invalid, target with a new target.
|
void |
setOffset(int offset) |
JumpInstruction |
setTarget(Instruction instruction)
Set the instruction to jump to; the instruction must already be
added to the code block.
|
void |
updateTargets()
Use the byte indexes read from the class file to calculate and
set references to the target instruction(s) for this ptr.
|
getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, getStackChange, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCode
public Instruction getTarget()
public JumpInstruction setTarget(Instruction instruction)
public boolean equalsInstruction(Instruction other)
equalsInstruction
in class Instruction
public void updateTargets()
InstructionPtr
updateTargets
in interface InstructionPtr
public void replaceTarget(Instruction oldTarget, Instruction newTarget)
InstructionPtr
replaceTarget
in interface InstructionPtr
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 Instruction
public void setOffset(int offset)
public int getOffset()
Copyright © 2002–2019. All rights reserved.