All Packages Class Hierarchy This Package Previous Next Index
Class de.fub.bytecode.generic.Instruction
java.lang.Object
|
+----de.fub.bytecode.generic.Instruction
- public abstract class Instruction
- extends Object
- implements Constants, Cloneable, Serializable
This abstract class is the super class for all java byte codes.
- Version:
- $Id: Instruction.java,v 1.13 1999/09/22 13:00:09 dahm Exp $
- Author:
- M. Dahm
-
length
-
-
tag
-
-
Instruction(short, short)
-
-
consumeStack()
-
-
consumeStack(ConstantPoolGen)
- Also works for instructions whose stack effect depends on the
constant pool entry they reference.
-
copy()
- Use with caution, since `BranchInstruction's have a `target' reference which
is not copied correctly (only basic types are).
-
dump(DataOutputStream)
- Dump instruction as byte code to stream out.
-
getLength()
-
-
getTag()
-
-
initFromFile(ByteSequence, boolean)
- Read needed data (e.g.
-
produceStack()
-
-
produceStack(ConstantPoolGen)
- Also works for instructions whose stack effect depends on the
constant pool entry they reference.
-
toString()
-
-
toString(boolean)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")"
-
toString(ConstantPool)
-
length
protected short length
tag
protected short tag
Instruction
public Instruction(short tag,
short length)
dump
public void dump(DataOutputStream out) throws IOException
- Dump instruction as byte code to stream out.
- Parameters:
- out - Output stream
toString
public String toString(boolean verbose)
- Long output format:
<name of opcode> "["<opcode number>"]"
"("<length of instruction>")"
- Parameters:
- verbose - long/short format switch
- Returns:
- mnemonic for instruction
toString
public String toString()
- Returns:
- mnemonic for instruction in verbose format
- Overrides:
- toString in class Object
toString
public String toString(ConstantPool cp)
- Returns:
- mnemonic for instruction with sumbolic references resolved
copy
public Instruction copy()
- Use with caution, since `BranchInstruction's have a `target' reference which
is not copied correctly (only basic types are). This also applies for
`Select' instructions with their multiple branch targets.
- Returns:
- (shallow) copy of an instruction
- See Also:
- BranchInstruction
initFromFile
protected void initFromFile(ByteSequence bytes,
boolean wide) throws IOException
- Read needed data (e.g. index) from file.
consumeStack
public int consumeStack()
- Returns:
- Number of words consumed from stack by this instruction
produceStack
public int produceStack()
- Returns:
- Number of words produced onto stack by this instruction
consumeStack
public int consumeStack(ConstantPoolGen cpg)
- Also works for instructions whose stack effect depends on the
constant pool entry they reference.
- Returns:
- Number of words consumed from stack by this instruction
produceStack
public int produceStack(ConstantPoolGen cpg)
- Also works for instructions whose stack effect depends on the
constant pool entry they reference.
- Returns:
- Number of words produced onto stack by this instruction
getTag
public short getTag()
- Returns:
- opcode number
getLength
public int getLength()
- Returns:
- length (in bytes) of instruction
All Packages Class Hierarchy This Package Previous Next Index