All Packages Class Hierarchy This Package Previous Next Index
Class de.fub.bytecode.generic.CPInstruction
java.lang.Object
|
+----de.fub.bytecode.generic.Instruction
|
+----de.fub.bytecode.generic.CPInstruction
- public abstract class CPInstruction
- extends Instruction
- implements Constants
Abstract super class for instructions that use an index into the
constant pool such as LDC, INVOKEVIRTUAL, etc.
- Version:
- $Id: CPInstruction.java,v 1.7 1999/07/09 15:55:07 dahm Exp $
- Author:
- M. Dahm
- See Also:
- ConstantPoolGen, LDC, INVOKEVIRTUAL
-
index
-
-
CPInstruction(short, int)
-
-
dump(DataOutputStream)
- Dump instruction as byte code to stream out.
-
getIndex()
-
-
getType(ConstantPoolGen)
-
-
initFromFile(ByteSequence, boolean)
- Read needed data (i.e.
-
setIndex(int)
- Set the index to constant pool.
-
toString(boolean)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
-
toString(ConstantPool)
-
index
protected int index
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(boolean verbose)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")" "<"< constant pool index>">"
- Parameters:
- verbose - long/short format switch
- Returns:
- mnemonic for instruction
- Overrides:
- toString in class Instruction
toString
public String toString(ConstantPool cp)
- Returns:
- mnemonic for instruction with symbolic references resolved
- 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 void setIndex(int index)
- Set the index to constant pool.
getType
public Type getType(ConstantPoolGen cpg)
- Returns:
- type related with this instruction.
All Packages Class Hierarchy This Package Previous Next Index