jellyj.classfile.classgen
Class CPInstruction
jellyj.classfile.classgen.Instruction
|
+--jellyj.classfile.classgen.CPInstruction
- Direct Known Subclasses:
- ANEWARRAY, CHECKCAST, GETFIELD, GETSTATIC, INSTANCEOF, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, LDC, LDC_W, LDC2_W, MULTIANEWARRAY, NEW, PUTFIELD, PUTSTATIC
- public abstract class CPInstruction
- extends Instruction
Abstract super class for instructions that use an index into the
constant pool such as LDC, INVOKEVIRTUAL, etc.
- Author:
- JellyJ Design Group
- See Also: ConstantPoolGen, LDC, INVOKEVIRTUAL
Constructor Summary |
(package private) | CPInstruction() Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). |
Method Summary |
void | dump(DataOutputStream out) Dump instruction as byte code to stream out. |
final int | getIndex() |
final void | setIndex(int index) Set the index to constant pool. |
String | toString() |
CPInstruction
CPInstruction()
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Not to be used otherwise.
dump
public void dump(DataOutputStream out)
throws java.io.IOException
- Dump instruction as byte code to stream out.
- Parameters:
- out - Output stream
getIndex
public final int getIndex()
- Returns: index in constant pool referred by this instruction.
setIndex
public final void setIndex(int index)
- Set the index to constant pool.
toString
public String toString()
- Returns: mnemonic for instruction