public class StackInstruction extends TypedInstruction
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.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. |
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.
|
getType, getTypeBC, setType, setType
equalsInstruction, getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, isValid
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
Copyright © 2002–2019. All rights reserved.