joeq.Compiler.BytecodeAnalysis
Class Bytecodes.FieldInstruction

java.lang.Object
  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
      extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
          extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.FieldOrMethod
              extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.FieldInstruction
All Implemented Interfaces:
Serializable, Cloneable, Bytecodes.LoadClass, Bytecodes.TypedInstruction
Direct Known Subclasses:
Bytecodes.GETFIELD, Bytecodes.GETSTATIC, Bytecodes.PUTFIELD, Bytecodes.PUTSTATIC
Enclosing interface:
Bytecodes

public abstract static class Bytecodes.FieldInstruction
extends Bytecodes.FieldOrMethod
implements Bytecodes.TypedInstruction

See Also:
Serialized Form

Field Summary
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
index, o
 
Fields inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
length, opcode
 
Constructor Summary
protected Bytecodes.FieldInstruction(short opcode, jq_Field f)
           
 
Method Summary
 jq_Field getField()
           
 String getFieldName()
           
protected  int getFieldSize()
           
 jq_Type getFieldType()
           
 jq_Type getType()
          Returns the type associated with this instruction.
 String toString()
           
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.FieldOrMethod
getClassName, getClassType, getLoadClassType, getName, getSignature, initFromFile
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.CPInstruction
dump, getIndex, getObject, setIndex, setObject, toString
 
Methods inherited from class joeq.Compiler.BytecodeAnalysis.Bytecodes.Instruction
accept, consumeStack, copy, getLength, getOpcode, produceStack, readInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bytecodes.FieldInstruction

protected Bytecodes.FieldInstruction(short opcode,
                                     jq_Field f)
Parameters:
opcode - instruction opcode
f - field
Method Detail

toString

public String toString()
Overrides:
toString in class Bytecodes.CPInstruction
Returns:
mnemonic for instruction with symbolic references resolved

getField

public jq_Field getField()

getFieldSize

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

getType

public jq_Type getType()
Description copied from interface: Bytecodes.LoadClass
Returns the type associated with this instruction. LoadClass instances are always typed, but this type does not always refer to the type of the class or interface that it possibly forces to load. For example, GETFIELD would return the type of the field and not the type of the class where the field is defined. If no class is forced to be loaded, null is returned. An example for this is an ANEWARRAY instruction that creates an int[][].

Specified by:
getType in interface Bytecodes.LoadClass
Specified by:
getType in interface Bytecodes.TypedInstruction
Overrides:
getType in class Bytecodes.CPInstruction
Returns:
return type of referenced field
See Also:
Bytecodes.LoadClass.getLoadClassType()

getFieldType

public jq_Type getFieldType()
Returns:
type of field

getFieldName

public String getFieldName()
Returns:
name of referenced field.


Copyright © 2001-2008 John Whaley. All Rights Reserved.