public class FieldrefConstant extends RefConstant
Constant represents a field reference constant in the constant pool.| Modifier and Type | Field and Description |
|---|---|
Field |
referencedField
An extra field optionally pointing to the referenced Field object.
|
referencedClass, u2classIndex, u2nameAndTypeIndexCLASS, DOUBLE, DYNAMIC, FIELDREF, FLOAT, INTEGER, INTERFACE_METHODREF, INVOKE_DYNAMIC, LONG, METHOD_HANDLE, METHOD_TYPE, METHODREF, MODULE, NAME_AND_TYPE, PACKAGE, PRIMITIVE_ARRAY, STRING, UTF8processingFlags, processingInfo| Constructor and Description |
|---|
FieldrefConstant()
Creates an uninitialized FieldrefConstant.
|
FieldrefConstant(int u2classIndex,
int u2nameAndTypeIndex,
Clazz referencedClass,
Field referencedField)
Creates a new FieldrefConstant with the given name and type indices.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Clazz clazz,
ConstantVisitor constantVisitor)
Accepts the given visitor.
|
int |
getTag()
Returns the constant pool info tag that specifies the entry type.
|
void |
referencedFieldAccept(MemberVisitor memberVisitor)
Lets the referenced class field accept the given visitor.
|
void |
referencedMemberAccept(MemberVisitor memberVisitor)
Lets the referenced class member accept the given visitor.
|
getClassIndex, getClassName, getName, getNameAndTypeIndex, getType, referencedClassAccept, setNameAndTypeIndexgetProcessingFlags, getProcessingInfo, setProcessingFlags, setProcessingInfopublic Field referencedField
ClassReferenceInitializer.public FieldrefConstant()
public FieldrefConstant(int u2classIndex,
int u2nameAndTypeIndex,
Clazz referencedClass,
Field referencedField)
u2classIndex - the index of the class in the constant pool.u2nameAndTypeIndex - the index of the name and type entry in the constant pool.referencedClass - the referenced class.referencedField - the referenced field.public void referencedFieldAccept(MemberVisitor memberVisitor)
public void referencedMemberAccept(MemberVisitor memberVisitor)
referencedMemberAccept in class RefConstantpublic int getTag()
Constantpublic void accept(Clazz clazz, ConstantVisitor constantVisitor)
Constant