Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Compil3r.BytecodeAnalysis
Class Bytecodes.LocalVariableInstruction  view Bytecodes.LocalVariableInstruction download Bytecodes.LocalVariableInstruction.java

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

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


Field Summary
private  short c_tag
           
private  short canon_tag
           
protected  int n
           
 
Fields inherited from class Compil3r.BytecodeAnalysis.Bytecodes.Instruction
length, opcode
 
Constructor Summary
(package private) Bytecodes.LocalVariableInstruction()
          Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
(package private) Bytecodes.LocalVariableInstruction(short canon_tag, short c_tag)
          Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
protected Bytecodes.LocalVariableInstruction(short opcode, short c_tag, int n)
           
 
Method Summary
 void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
 short getCanonicalTag()
           
 int getIndex()
           
 Clazz.jq_Type getType()
          Returns the type associated with the instruction - in case of ALOAD or ASTORE Type.OBJECT is returned.
protected  void initFromFile(Clazz.jq_ConstantPool cp, Util.IO.ByteSequence bytes, boolean wide)
          Read needed data (e.g.
 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>">"
private  boolean wide()
           
 
Methods inherited from class Compil3r.BytecodeAnalysis.Bytecodes.Instruction
accept, consumeStack, copy, dispose, getLength, getOpcode, produceStack, readInstruction, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

n

protected int n

c_tag

private short c_tag

canon_tag

private short canon_tag
Constructor Detail

Bytecodes.LocalVariableInstruction

Bytecodes.LocalVariableInstruction(short canon_tag,
                                   short c_tag)
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise. tag and length are defined in readInstruction and initFromFile, respectively.


Bytecodes.LocalVariableInstruction

Bytecodes.LocalVariableInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Also used by IINC()!


Bytecodes.LocalVariableInstruction

protected Bytecodes.LocalVariableInstruction(short opcode,
                                             short c_tag,
                                             int n)
Method Detail

wide

private final boolean wide()

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

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

initFromFile

protected void initFromFile(Clazz.jq_ConstantPool cp,
                            Util.IO.ByteSequence bytes,
                            boolean wide)
                     throws java.io.IOException
Read needed data (e.g. index) from file. PRE: (ILOAD <= tag <= ALOAD_3) || (ISTORE <= tag <= ASTORE_3)

Overrides:
initFromFile in class Bytecodes.Instruction

getIndex

public final int getIndex()
Specified by:
getIndex in interface Bytecodes.IndexedInstruction

setIndex

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

Specified by:
setIndex in interface Bytecodes.IndexedInstruction

getCanonicalTag

public short getCanonicalTag()

getType

public final Clazz.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