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,v 1.1.1.1 2001/10/29 20:00:07 jvanzyl Exp $
accept , consumeStack , copy , dump , equals , getComparator , getLength , getName , getOpcode , initFromFile , produceStack , readInstruction , setComparator , toString , toString , toString |
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