org.apache.bcel.generic
Class CPInstruction
- Cloneable, IndexedInstruction, Serializable, TypedInstruction
public abstract class CPInstruction
Abstract super class for instructions that use an index into the
constant pool such as LDC, INVOKEVIRTUAL, etc.
$Id: CPInstruction.java 386056 2006-03-15 11:31:56Z tcurdt $
CPInstruction() - Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction().
|
CPInstruction(short opcode, int index)
|
accept , className , consumeStack , copy , dispose , dump , equals , getComparator , getLength , getName , getOpcode , initFromFile , produceStack , readInstruction , setComparator , setOpcode , toString , toString , toString |
CPInstruction
(package private) CPInstruction()
Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Not to be used otherwise.
CPInstruction
protected CPInstruction(short opcode,
int index)
dump
public void dump(DataOutputStream out)
throws IOException
Dump instruction as byte code to stream out.
- dump in interface Instruction
initFromFile
protected void initFromFile(ByteSequence bytes,
boolean wide)
throws IOException
Read needed data (i.e., index) from file.
- initFromFile in interface Instruction
bytes
- input streamwide
- wide prefix?
setIndex
public void setIndex(int index)
Set the index to constant pool.
- setIndex in interface IndexedInstruction
index
- in constant pool.
toString
public String toString(boolean verbose)
Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
- toString in interface Instruction
verbose
- long/short format switch