de.fub.bytecode.generic
Class FieldInstruction

java.lang.Object
  |
  +--de.fub.bytecode.generic.Instruction
        |
        +--de.fub.bytecode.generic.CPInstruction
              |
              +--de.fub.bytecode.generic.FieldOrMethod
                    |
                    +--de.fub.bytecode.generic.FieldInstruction
Direct Known Subclasses:
GETFIELD, GETSTATIC, PUTFIELD, PUTSTATIC

public abstract class FieldInstruction
extends FieldOrMethod

Super class for the GET/PUTxxx family of instructions.

Version:
$Id: FieldInstruction.java,v 1.6 1999/07/09 15:55:08 dahm Exp $
Author:
M. Dahm
See Also:
Serialized Form

Fields inherited from class de.fub.bytecode.generic.CPInstruction
index
 
Fields inherited from class de.fub.bytecode.generic.Instruction
length, tag
 
Constructor Summary
protected FieldInstruction(short tag, int index)
           
 
Method Summary
 java.lang.String getFieldName(ConstantPoolGen cpg)
           
protected  int getFieldSize(ConstantPoolGen cpg)
           
 Type getFieldType(ConstantPoolGen cpg)
           
 Type getType(ConstantPoolGen cpg)
           
 java.lang.String toString(ConstantPool cp)
           
 
Methods inherited from class de.fub.bytecode.generic.FieldOrMethod
getClassName, getClassType, getName, getSignature
 
Methods inherited from class de.fub.bytecode.generic.CPInstruction
dump, getIndex, initFromFile, setIndex, toString
 
Methods inherited from class de.fub.bytecode.generic.Instruction
consumeStack, consumeStack, copy, getLength, getTag, produceStack, produceStack, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldInstruction

protected FieldInstruction(short tag,
                           int index)
Parameters:
index - to constant pool
Method Detail

toString

public java.lang.String toString(ConstantPool cp)
Returns:
mnemonic for instruction with symbolic references resolved
Overrides:
toString in class CPInstruction

getFieldSize

protected int getFieldSize(ConstantPoolGen cpg)
Returns:
size of field (1 or 2)

getType

public Type getType(ConstantPoolGen cpg)
Returns:
return type of referenced field
Overrides:
getType in class CPInstruction

getFieldType

public Type getFieldType(ConstantPoolGen cpg)
Returns:
type of field

getFieldName

public java.lang.String getFieldName(ConstantPoolGen cpg)
Returns:
name of referenced field.