public abstract class FieldInstruction extends FieldOrMethod
index
length, opcode
Modifier | Constructor and Description |
---|---|
protected |
FieldInstruction(short opcode,
int index) |
Modifier and Type | Method and Description |
---|---|
String |
getFieldName(ConstantPoolGen cpg) |
protected int |
getFieldSize(ConstantPoolGen cpg) |
Type |
getFieldType(ConstantPoolGen cpg) |
Type |
getType(ConstantPoolGen cpg)
Returns the type associated with this instruction.
|
String |
toString(ConstantPool cp) |
getClassName, getClassType, getLoadClassType, getName, getReferenceType, getSignature
dump, getIndex, initFromFile, setIndex, toString
accept, consumeStack, copy, equals, getComparator, getLength, getName, getOpcode, hashCode, isValidByte, isValidShort, produceStack, readInstruction, setComparator, toString
protected FieldInstruction(short opcode, int index)
index
- to constant poolpublic String getFieldName(ConstantPoolGen cpg)
protected int getFieldSize(ConstantPoolGen cpg)
public Type getFieldType(ConstantPoolGen cpg)
public Type getType(ConstantPoolGen cpg)
LoadClass
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 NEWARRAY
instruction that creates an
int[][]
.getType
in interface LoadClass
getType
in interface TypedInstruction
getType
in class CPInstruction
cpg
- A ConstantPoolGenLoadClass.getLoadClassType(ConstantPoolGen)
public String toString(ConstantPool cp)
toString
in class CPInstruction
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.