public class LDC extends CPInstruction implements PushInstruction, ExceptionThrower
Stack: ... -> ..., item
index
length, opcode
Constructor and Description |
---|
LDC(int index) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Call corresponding visitor method(s).
|
void |
dump(java.io.DataOutputStream out)
Dump instruction as byte code to stream out.
|
java.lang.Class<?>[] |
getExceptions() |
Type |
getType(ConstantPoolGen cpg) |
java.lang.Object |
getValue(ConstantPoolGen cpg) |
protected void |
initFromFile(ByteSequence bytes,
boolean wide)
Read needed data (e.g.
|
void |
setIndex(int index)
Set the index to constant pool and adjust size.
|
protected void |
setSize() |
getIndex, toString, toString
consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, produceStack, readInstruction, setComparator, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
produceStack
protected final void setSize()
public void dump(java.io.DataOutputStream out) throws java.io.IOException
dump
in class CPInstruction
out
- Output streamjava.io.IOException
public final void setIndex(int index)
setIndex
in interface IndexedInstruction
setIndex
in class CPInstruction
index
- in constant pool.protected void initFromFile(ByteSequence bytes, boolean wide) throws java.io.IOException
initFromFile
in class CPInstruction
bytes
- input streamwide
- wide prefix?java.io.IOException
- may be thrown if the implementation needs to read data from the filepublic java.lang.Object getValue(ConstantPoolGen cpg)
public Type getType(ConstantPoolGen cpg)
getType
in interface TypedInstruction
getType
in class CPInstruction
public java.lang.Class<?>[] getExceptions()
getExceptions
in interface ExceptionThrower
public void accept(Visitor v)
accept
in class Instruction
v
- Visitor object