Package proguard.classfile.constant
Class RefConstant
- java.lang.Object
-
- proguard.util.SimpleProcessable
-
- proguard.classfile.constant.Constant
-
- proguard.classfile.constant.RefConstant
-
- All Implemented Interfaces:
java.io.Serializable
,Processable
- Direct Known Subclasses:
AnyMethodrefConstant
,FieldrefConstant
public abstract class RefConstant extends Constant
ThisConstant
represents a ref constant in the constant pool.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Clazz
referencedClass
An extra field pointing to the referenced Clazz object.int
u2classIndex
int
u2nameAndTypeIndex
-
Fields inherited from class proguard.classfile.constant.Constant
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
-
Fields inherited from class proguard.util.SimpleProcessable
processingFlags, processingInfo
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RefConstant()
Creates an uninitialized RefConstant.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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()
-
Methods inherited from class proguard.classfile.constant.Constant
accept, getTag, isCategory2
-
Methods inherited from class proguard.util.SimpleProcessable
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
-
-
-
-
Field Detail
-
u2classIndex
public int u2classIndex
-
u2nameAndTypeIndex
public int u2nameAndTypeIndex
-
referencedClass
public Clazz referencedClass
An extra field pointing to the referenced Clazz object. This field is typically filled out by the
.ClassReferenceInitializer
-
-
Method Detail
-
getClassIndex
public int getClassIndex()
Returns the class index.
-
getNameAndTypeIndex
public int getNameAndTypeIndex()
Returns the name-and-type index.
-
setNameAndTypeIndex
public void setNameAndTypeIndex(int index)
Sets the name-and-type index.
-
getClassName
public java.lang.String getClassName(Clazz clazz)
Returns the class name.
-
getName
public java.lang.String getName(Clazz clazz)
Returns the method/field name.
-
getType
public java.lang.String getType(Clazz clazz)
Returns the type.
-
referencedClassAccept
public void referencedClassAccept(ClassVisitor classVisitor)
Lets the referenced class accept the given visitor.
-
referencedMemberAccept
public abstract void referencedMemberAccept(MemberVisitor memberVisitor)
Lets the referenced class member accept the given visitor.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-