|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.classfile.AbstractInstructionAccessor
at.dms.classfile.Instruction
at.dms.classfile.PushLiteralInstruction
public class PushLiteralInstruction
This class encapsulates the instructions pushing a literal on the stack: bipush, sipush, ldc, ldc_w, ldc2_w, dconst_d, fconst_f, iconst_i, lconst_l
Field Summary |
---|
Constructor Summary | |
---|---|
PushLiteralInstruction(double value)
Constructs an instruction that pushes a double literal on the stack. |
|
PushLiteralInstruction(float value)
Constructs an instruction that pushes a float literal on the stack. |
|
PushLiteralInstruction(int value)
Constructs an instruction that pushes a int literal on the stack. |
|
PushLiteralInstruction(long value)
Constructs an instruction that pushes a long literal on the stack. |
|
PushLiteralInstruction(PooledConstant cst,
boolean wide)
Constructs an instruction that pushes a string literal on the stack from a class file stream. |
|
PushLiteralInstruction(String value)
Constructs an instruction that pushes a string literal on the stack. |
Method Summary | |
---|---|
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
Object |
getLiteral()
Returns the value of this literal |
int |
getPushedOnStack()
Returns the size of data pushed on the stack by this instruction |
byte |
getReturnType()
Returns the type pushed on the stack |
int |
getStack()
Return the amount of stack (positive or negative) used by this instruction |
boolean |
isLiteral()
Return true if this instruction is a literal |
Methods inherited from class at.dms.classfile.Instruction |
---|
dump, getOpcode, getPoppedFromStack |
Methods inherited from class at.dms.classfile.AbstractInstructionAccessor |
---|
deepClone, deepCloneInto, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PushLiteralInstruction(double value)
value
- a double literalpublic PushLiteralInstruction(float value)
value
- a float literalpublic PushLiteralInstruction(int value)
value
- a int literalpublic PushLiteralInstruction(long value)
value
- a long literalpublic PushLiteralInstruction(String value)
value
- a string literalpublic PushLiteralInstruction(PooledConstant cst, boolean wide)
cst
- a pooled constantwide
- does this constant use 2 slots in the pool ?Method Detail |
---|
public boolean canComplete()
canComplete
in class Instruction
public boolean isLiteral()
isLiteral
in class Instruction
public Object getLiteral()
public int getPushedOnStack()
getPushedOnStack
in class Instruction
public byte getReturnType()
getReturnType
in class Instruction
public int getStack()
getStack
in class Instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |