org.apache.bcel.generic

Class LDC

public class LDC extends CPInstruction implements PushInstruction, ExceptionThrower, TypedInstruction

LDC - Push item from constant pool.
Stack: ... -> ..., item
Constructor Summary
LDC(int index)
Method Summary
voidaccept(Visitor v)
Call corresponding visitor method(s).
voiddump(DataOutputStream out)
Dump instruction as byte code to stream out.
Class[]getExceptions()
TypegetType(ConstantPoolGen cpg)
ObjectgetValue(ConstantPoolGen cpg)
protected voidinitFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.
voidsetIndex(int index)
Set the index to constant pool and adjust size.
protected voidsetSize()

Constructor Detail

LDC

public LDC(int index)

Method Detail

accept

public void accept(Visitor v)
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Parameters: v Visitor object

dump

public void dump(DataOutputStream out)
Dump instruction as byte code to stream out.

Parameters: out Output stream

getExceptions

public Class[] getExceptions()

getType

public Type getType(ConstantPoolGen cpg)

getValue

public Object getValue(ConstantPoolGen cpg)

initFromFile

protected void initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.

setIndex

public final void setIndex(int index)
Set the index to constant pool and adjust size.

setSize

protected final void setSize()