public abstract class RefConstant extends Constant
Constant
represents a ref constant in the constant pool.Modifier and Type | Field and Description |
---|---|
Clazz |
referencedClass
An extra field pointing to the referenced Clazz object.
|
int |
u2classIndex |
int |
u2nameAndTypeIndex |
CLASS, DOUBLE, DYNAMIC, FIELDREF, FLOAT, INTEGER, INTERFACE_METHODREF, INVOKE_DYNAMIC, LONG, METHOD_HANDLE, METHOD_TYPE, METHODREF, MODULE, NAME_AND_TYPE, PACKAGE, PRIMITIVE_ARRAY, STRING, UTF8
processingFlags, processingInfo
Modifier | Constructor and Description |
---|---|
protected |
RefConstant()
Creates an uninitialized RefConstant.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
int |
getClassIndex()
Returns the class index.
|
java.lang.String |
getClassName(Clazz clazz)
Returns the class name.
|
java.lang.String |
getName(Clazz clazz)
Returns the method/field name.
|
int |
getNameAndTypeIndex()
Returns the name-and-type index.
|
java.lang.String |
getType(Clazz clazz)
Returns the type.
|
int |
hashCode() |
void |
referencedClassAccept(ClassVisitor classVisitor)
Lets the referenced class accept the given visitor.
|
abstract void |
referencedMemberAccept(MemberVisitor memberVisitor)
Lets the referenced class member accept the given visitor.
|
void |
setNameAndTypeIndex(int index)
Sets the name-and-type index.
|
java.lang.String |
toString() |
accept, getTag, isCategory2
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
public int u2classIndex
public int u2nameAndTypeIndex
public Clazz referencedClass
ClassReferenceInitializer
.public int getClassIndex()
public int getNameAndTypeIndex()
public void setNameAndTypeIndex(int index)
public java.lang.String getClassName(Clazz clazz)
public java.lang.String getName(Clazz clazz)
public java.lang.String getType(Clazz clazz)
public void referencedClassAccept(ClassVisitor classVisitor)
public abstract void referencedMemberAccept(MemberVisitor memberVisitor)
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object