All Packages Class Hierarchy This Package Previous Next Index
Class espresso.classfile.classgen.CPInstruction
java.lang.Object
|
+----espresso.classfile.classgen.Instruction
|
+----espresso.classfile.classgen.CPInstruction
- public abstract class CPInstruction
- extends Instruction
Abstract super class for instructions that use an index into the
constant pool such as LDC, INVOKEVIRTUAL, etc.
- See Also:
- ConstantPoolGen, LDC, INVOKEVIRTUAL
-
index
-
-
CPInstruction()
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction().
-
CPInstruction(short, int)
-
-
dump(DataOutputStream)
- Dump instruction as byte code to stream out.
-
getIndex()
-
-
initFromFile(ByteSequence, boolean)
- Read needed data (i.e.
-
setIndex(int)
- Set the index to constant pool.
-
toString()
-
index
protected int index
CPInstruction
CPInstruction()
- Empty constructor needed for the Class.newInstance() statement in
Instruction.readInstruction(). Not to be used otherwise.
CPInstruction
protected CPInstruction(short tag,
int index)
- Parameters:
- index - to constant pool
dump
public void dump(DataOutputStream out) throws IOException
- Dump instruction as byte code to stream out.
- Parameters:
- out - Output stream
- Overrides:
- dump in class Instruction
toString
public String toString()
- Returns:
- mnemonic for instruction
- Overrides:
- toString in class Instruction
initFromFile
protected void initFromFile(ByteSequence bytes,
boolean wide) throws IOException
- Read needed data (i.e. index) from file.
- Overrides:
- initFromFile in class Instruction
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.
All Packages Class Hierarchy This Package Previous Next Index