public class Instruction extends Object implements BCEntity, VisitAcceptor
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)
Instructions are equal if their opcodes are the same.
|
int |
getByteIndex()
Return the index in the method code byte block at which this opcode
starts.
|
ClassLoader |
getClassLoader()
Return the class loader to use when loading related classes.
|
Code |
getCode()
Return the code block that owns this instruction.
|
LineNumber |
getLineNumber()
Return the line number of this instruction, or null if none.
|
int |
getLogicalStackChange()
Return the logical number of stack positions changed by this
instruction.
|
String |
getName()
Return the name of this instruction.
|
int |
getOpcode()
Return the opcode this instruction represents.
|
ConstantPool |
getPool()
Return the constant pool of the current class.
|
Project |
getProject()
Return the project of the current class.
|
int |
getStackChange()
Return the number of stack positions this instruction pushes
or pops during its execution.
|
boolean |
isValid()
Return false if this entity has been removed from its parent; in this
case the results of any operations on the entity are undefined.
|
public Code getCode()
public String getName()
public int getOpcode()
public int getByteIndex()
public LineNumber getLineNumber()
getByteIndex()
.public int getLogicalStackChange()
public int getStackChange()
public boolean equalsInstruction(Instruction other)
public Project getProject()
BCEntity
getProject
in interface BCEntity
public ConstantPool getPool()
BCEntity
public ClassLoader getClassLoader()
BCEntity
getClassLoader
in interface BCEntity
public boolean isValid()
BCEntity
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
Copyright © 2002–2019. All rights reserved.