All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class BIT.highBIT.Instruction

java.lang.Object
   |
   +----BIT.highBIT.Instruction

public class Instruction
extends Object
implements Cloneable
Represents a valid Java Virtual Machine instrucion.

See Also:
Routine

Variable Index

 o index
Index of this instruction in InstructionArray
 o modified
Is this an instruction in the modified array?
 o modified_index
Index of this instruction in modified instructions array
 o offset
This variable indicates the offset of this instruction from the start of code buffer.
 o opcode
Represents the opcode of the instruction.
 o routine
Pointer to the routine that this instruction is in.

Constructor Index

 o Instruction(int, int, Routine)
Constructor for Instruction class.
 o Instruction(int, Routine)

Method Index

 o addAfter(String, String, Object)
 o addBefore(String, String, Object)
 o clone()
 o getDoubleOperandValue()
 o getInstructionType()
Returns the type of this instruction.
 o getLength()
Returns the length of this instruction.
 o getModifiedIndex()
Gets the modified index of this instruction.
 o getOffset()
Returns the offset of this instruction from the start of code buffer.
 o getOpcode()
Returns the opcode of this instruction.
 o getOperandValue()
Returns the value of the operands.
 o setIndex(int)
Sets the index of this instruction.
 o setModified()
 o setModifiedIndex(int)
Sets the modified index of this instruction.
 o setOffset(int)
Set the offset of the instruction.
 o write(DataOutputStream)

Variables

 o opcode
 protected int opcode
Represents the opcode of the instruction.
This value can be read by invoking getOpcode() method.

See Also:
getOpcode
 o offset
 protected int offset
This variable indicates the offset of this instruction from the start of code buffer.

 o routine
 protected Routine routine
Pointer to the routine that this instruction is in.

 o index
 protected int index
Index of this instruction in InstructionArray

 o modified_index
 protected int modified_index
Index of this instruction in modified instructions array

 o modified
 protected boolean modified
Is this an instruction in the modified array?

Constructors

 o Instruction
 public Instruction(int opcode,
                    int offset,
                    Routine routine)
Constructor for Instruction class.

Parameters:
opcode - the opcode of this instruction
offset - the offset of this instruction in bytes from start of code buffer
 o Instruction
 public Instruction(int opcode,
                    Routine routine)

Methods

 o setIndex
 public void setIndex(int index)
Sets the index of this instruction.

 o setModifiedIndex
 public void setModifiedIndex(int modified_index)
Sets the modified index of this instruction. A modified index is the index of this instruction that corresponds to the modified instructions array.

 o getModifiedIndex
 public int getModifiedIndex()
Gets the modified index of this instruction. A modified index is the index of this instruction that corresponds to the modified instructions array.

 o getOpcode
 public int getOpcode()
Returns the opcode of this instruction.

 o getDoubleOperandValue
 public int getDoubleOperandValue()
 o write
 public void write(DataOutputStream oStream)
 o getInstructionType
 public short getInstructionType()
Returns the type of this instruction.

 o getOffset
 public int getOffset()
Returns the offset of this instruction from the start of code buffer.

 o getLength
 public int getLength()
Returns the length of this instruction.

 o getOperandValue
 public int getOperandValue()
Returns the value of the operands.

 o setOffset
 public void setOffset(int offset)
Set the offset of the instruction.

 o setModified
 public void setModified()
 o clone
 protected Object clone() throws CloneNotSupportedException
Overrides:
clone in class Object
 o addBefore
 public int addBefore(String classname,
                      String methodname,
                      Object arg)
 o addAfter
 public int addAfter(String classname,
                     String methodname,
                     Object arg)

All Packages  Class Hierarchy  This Package  Previous  Next  Index