joeq.Compiler.BytecodeAnalysis
Class Bytecodes.LocalVariableInstruction

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.LocalVariableInstruction
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Bytecodes.IndexedInstruction, Bytecodes.TypedInstruction
Direct Known Subclasses:
Bytecodes.IINC, Bytecodes.LoadInstruction, Bytecodes.StoreInstruction
Enclosing interface:
Bytecodes

public abstract static class Bytecodes.LocalVariableInstruction
extends Bytecodes.Instruction
implements Bytecodes.TypedInstruction, Bytecodes.IndexedInstruction

See Also:
Serialized Form

Method Summary
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 short getCanonicalTag()
           
 int getIndex()
           
 jq_Type getType()
          Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.
 void setIndex(int n)
          Set the local variable index
 java.lang.String toString(boolean verbose)
          Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< local variable index>">"
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
accept, consumeStack, copy, getLength, getOpcode, produceStack, readInstruction, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

dump

public void dump(java.io.DataOutputStream out)
          throws java.io.IOException
Dump instruction as byte code to stream out.

Overrides:
dump in class Bytecodes.Instruction
Parameters:
out - Output stream
Throws:
java.io.IOException

toString

public java.lang.String toString(boolean verbose)
Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< local variable index>">"

Overrides:
toString in class Bytecodes.Instruction
Parameters:
verbose - long/short format switch
Returns:
mnemonic for instruction

getIndex

public final int getIndex()
Specified by:
getIndex in interface Bytecodes.IndexedInstruction
Returns:
local variable index referred by this instruction.

setIndex

public void setIndex(int n)
Set the local variable index

Specified by:
setIndex in interface Bytecodes.IndexedInstruction

getCanonicalTag

public short getCanonicalTag()
Returns:
canonical tag for instruction, e.g., ALOAD for ALOAD_0

getType

public final jq_Type getType()
Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned. This is just a bit incorrect, because ALOAD and ASTORE may work on every ReferenceType (including Type.NULL) and ASTORE may even work on a ReturnaddressType .

Specified by:
getType in interface Bytecodes.TypedInstruction
Returns:
type associated with the instruction