Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class DE.fub.inf.JVM.ClassGen.LocalVariableInstruction

java.lang.Object
  |
  +--DE.fub.inf.JVM.ClassGen.Instruction
        |
        +--DE.fub.inf.JVM.ClassGen.LocalVariableInstruction
Subclasses:
ALOAD, ASTORE, DLOAD, DSTORE, FLOAD, FSTORE, ILOAD, ISTORE, LLOAD, LSTORE

public abstract class LocalVariableInstruction
extends Instruction
Abstract super class for instructions dealing with local variables.

Version:
$Id: LocalVariableInstruction.java,v 1.4 1998/09/15 08:42:25 dahm Exp $
Author:
M. Dahm
See Also:
Serialized Form

Fields inherited from class DE.fub.inf.JVM.ClassGen.Instruction
length, position, tag
 
Constructor Summary
LocalVariableInstruction(short tag, short c_tag, int n)
           
 
Method Summary
void dump(java.io.DataOutputStream out)
          Dump instruction as byte code to stream out.
int getIndex()
           
void initFromFile(ByteSequence bytes, boolean wide)
          Read needed data (e.g. index) from file.
void setIndex(int n)
          Set the local variable index
java.lang.String toString(boolean verbose)
          Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< local variable index>">"
 
Methods inherited from class DE.fub.inf.JVM.ClassGen.Instruction
consumeStack, dump, getInstructionList, getLength, getPosition, getTag, initFromFile, produceStack, readInstruction, setPosition, toString, toString, toString, updatePosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

LocalVariableInstruction

protected LocalVariableInstruction(short tag,
                                   short c_tag,
                                   int n)
Parameters:
tag - Instruction number
c_tag - Instruction number for compact version, ALOAD_0, e.g.
n - local variable index (unsigned short)
Method Detail

dump

public void dump(java.io.DataOutputStream out)
         throws java.io.IOException
Dump instruction as byte code to stream out.
Parameters:
out - Output stream
Overrides:
dump in class Instruction

toString

public java.lang.String toString(boolean verbose)
Long output format: <position in byte code> <name of opcode> "["<opcode number>"]" "("<length of instruction>")" "<"< local variable index>">"
Parameters:
verbose - long/short format switch
Returns:
mnemonic for instruction
Overrides:
toString in class Instruction

initFromFile

protected void initFromFile(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 Instruction

getIndex

public final int getIndex()
Returns:
local variable index referred by this instruction.

setIndex

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

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD