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, setTypeequalsInstruction, getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, isValidpublic int getStackChange()
InstructiongetStackChange in class Instructionpublic String getTypeName()
isWide() to determine
if this is pop2, dup2, etc.getTypeName in class TypedInstructionpublic TypedInstruction setType(String type)
TypedInstructionsetType in class TypedInstructionpublic boolean isWide()
public StackInstruction setWide(boolean wide)
public void acceptVisit(BCVisitor visit)
VisitAcceptorBCVisitor, 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 VisitAcceptoracceptVisit in class InstructionCopyright © 2002–2016. All rights reserved.