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(DataOutputStream out)
Dump instruction as byte code to stream out.
|
Class<?>[] |
getExceptions() |
Type |
getType(ConstantPoolGen cpg) |
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(DataOutputStream out) throws IOException
dump
in class CPInstruction
out
- Output streamIOException
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 IOException
initFromFile
in class CPInstruction
bytes
- input streamwide
- wide prefix?IOException
- may be thrown if the implementation needs to read data from the filepublic Object getValue(ConstantPoolGen cpg)
public Type getType(ConstantPoolGen cpg)
getType
in interface TypedInstruction
getType
in class CPInstruction
public Class<?>[] getExceptions()
getExceptions
in interface ExceptionThrower
public void accept(Visitor v)
accept
in class Instruction
v
- Visitor objectCopyright © 2017. All rights reserved.