|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object serp.bytecode.Instruction serp.bytecode.TypedInstruction serp.bytecode.StackInstruction
public class StackInstruction
Represents an instruction that manipulates the stack of the current
frame. Using the setType(java.lang.String)
methods is a hint about the type being
manipulated that might cause this instruction to use the wide version
of the opcode it represents (if manipulating a long or double). This
saves the developer from having to decide at compile time whether to
use pop
or pop2
, etc.
Method Summary | |
---|---|
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. |
int |
getStackChange()
Return the number of stack positions this instruction pushes or pops during its execution. |
String |
getTypeName()
This method will always return null; use isWide() to determine
if this is pop2, dup2, etc. |
boolean |
isWide()
Return whether to use the wide form of the current opcode for operations on longs or doubles. |
TypedInstruction |
setType(String type)
Set the type of this instruction. |
StackInstruction |
setWide(boolean wide)
Set whether to use the wide form of the current opcode for operations on longs or doubles. |
Methods inherited from class serp.bytecode.TypedInstruction |
---|
getType, getTypeBC, setType, setType |
Methods inherited from class serp.bytecode.Instruction |
---|
equalsInstruction, getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getStackChange()
Instruction
getStackChange
in class Instruction
public String getTypeName()
isWide()
to determine
if this is pop2, dup2, etc.
getTypeName
in class TypedInstruction
public TypedInstruction setType(String type)
TypedInstruction
setType
in class TypedInstruction
public boolean isWide()
public StackInstruction setWide(boolean wide)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |