Class GETFIELD
- All Implemented Interfaces:
Cloneable, ExceptionThrower, IndexedInstruction, LoadClass, StackConsumer, StackProducer, TypedInstruction
public class GETFIELD
extends FieldInstruction
implements ExceptionThrower, StackConsumer, StackProducer
GETFIELD - Fetch field from object
Stack: ..., objectref -> ..., valueOR
Stack: ..., objectref -> ..., value.word1, value.word2
-
Field Summary
Fields inherited from class CPInstruction
indexFields inherited from class Instruction
length, opcode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCall corresponding visitor method(s).Class<?>[]Gets the exceptions that may be thrown by this instruction.intThis method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.Methods inherited from class FieldInstruction
getFieldName, getFieldSize, getFieldType, getType, toStringMethods inherited from class FieldOrMethod
getClassName, getClassType, getLoadClassType, getName, getReferenceType, getSignatureMethods inherited from class CPInstruction
dump, getIndex, initFromFile, setIndex, toStringMethods inherited from class Instruction
consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, readInstruction, setComparator, toStringMethods inherited from interface StackConsumer
consumeStack
-
Constructor Details
-
GETFIELD
Constructs a GETFIELD instruction.- Parameters:
index- the constant pool index.
-
-
Method Details
-
accept
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, that is, the most specific visitXXX() call comes last.- Specified by:
acceptin classInstruction- Parameters:
v- Visitor object.
-
getExceptions
Description copied from interface:ExceptionThrowerGets the exceptions that may be thrown by this instruction.- Specified by:
getExceptionsin interfaceExceptionThrower- Returns:
- the exceptions that may be thrown by this instruction.
-
produceStack
Description copied from class:InstructionThis method also gives right results for instructions whose effect on the stack depends on the constant pool entry they reference.- Specified by:
produceStackin interfaceStackProducer- Overrides:
produceStackin classInstruction- Parameters:
cpg- the constant pool generator.- Returns:
- Number of words produced onto stack by this instruction, or Constants.UNPREDICTABLE, if this cannot be computed statically
-