Class FieldInstruction
java.lang.Object
org.apache.bcel.generic.Instruction
org.apache.bcel.generic.CPInstruction
org.apache.bcel.generic.FieldOrMethod
org.apache.bcel.generic.FieldInstruction
- All Implemented Interfaces:
Cloneable, IndexedInstruction, LoadClass, TypedInstruction
Super class for the GET/PUTxxx family of instructions.
-
Field Summary
Fields inherited from class CPInstruction
indexFields inherited from class Instruction
length, opcode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFieldInstruction(short opcode, int index) Constructs a FieldInstruction. -
Method Summary
Modifier and TypeMethodDescriptionGets the name of referenced field.protected intGets the size of field.Gets the type of field.getType(ConstantPoolGen cpg) Gets the type associated with this instruction.toString(ConstantPool cp) Gets the mnemonic for instruction with symbolic references resolved.Methods inherited from class FieldOrMethod
getClassName, getClassType, getLoadClassType, getName, getReferenceType, getSignatureMethods inherited from class CPInstruction
dump, getIndex, initFromFile, setIndex, toStringMethods inherited from class Instruction
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString
-
Constructor Details
-
FieldInstruction
Constructs a FieldInstruction.- Parameters:
opcode- the opcode.index- to constant pool.
-
-
Method Details
-
getFieldName
Gets the name of referenced field.- Parameters:
cpg- the constant pool generator.- Returns:
- name of referenced field.
-
getFieldSize
Gets the size of field.- Parameters:
cpg- the constant pool generator.- Returns:
- size of field (1 or 2).
-
getFieldType
Gets the type of field.- Parameters:
cpg- the constant pool generator.- Returns:
- type of field.
-
getType
Description copied from interface:TypedInstructionGets the type associated with this instruction.- Specified by:
getTypein interfaceLoadClass- Specified by:
getTypein interfaceTypedInstruction- Overrides:
getTypein classCPInstruction- Parameters:
cpg- the constant pool generator.- Returns:
- return type of referenced field.
- See Also:
-
toString
Description copied from class:InstructionGets the mnemonic for instruction with symbolic references resolved.- Overrides:
toStringin classCPInstruction- Parameters:
cp- the constant pool.- Returns:
- mnemonic for instruction with symbolic references resolved.
-