Package proguard.classfile
Interface Clazz
- All Superinterfaces:
FeatureNamed,Processable,Serializable
- All Known Implementing Classes:
LibraryClass,ProgramClass
This interface provides access to the fundamental properties of a Java class.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(ClassVisitor classVisitor) Accepts the given class visitor.voidaddSubClass(Clazz clazz) Notifies this Clazz that it is being subclassed by another class.voidattributeAccept(String name, AttributeVisitor attributeVisitor) Lets the given attribute info visitor visit the specified attribute.voidattributesAccept(AttributeVisitor attributeVisitor) Lets the given attribute info visitor visit all attributes of this class.voidconstantPoolEntriesAccept(ConstantVisitor constantVisitor) Lets the given constant pool entry visitor visit all constant pool entries of this class.voidconstantPoolEntryAccept(int index, ConstantVisitor constantVisitor) Lets the given constant pool entry visitor visit the constant pool entry at the specified index.booleanReturns whether this class extends the specified class.booleanReturns whether this class extends the given class.booleanextendsOrImplements(String className) Returns whether this class implements the specified class.booleanextendsOrImplements(Clazz clazz) Returns whether this class implements the given class.voidfieldAccept(String name, String descriptor, MemberVisitor memberVisitor) Lets the given member info visitor visit the specified field.voidfieldsAccept(MemberVisitor memberVisitor) Lets the given member info visitor visit all fields of this class.Returns the field with the given name and descriptor.findMethod(String name, String descriptor) Returns the method with the given name and descriptor.intReturns the access flags of this class.getClassName(int constantIndex) Returns the class name of ClassConstant at the specified index.getInterface(int index) Returns the interface at the given index.intReturns the number of interfaces that this class implements.getInterfaceName(int index) Returns the full internal name of the interface at the given index of this class.getModuleName(int constantIndex) Returns the name of the ModuleConstant at the specified index.getName()Returns the full internal name of this class.getName(int constantIndex) Returns the name of the NameAndTypeConstant at the specified index.getPackageName(int constantIndex) Returns the name of the PackageConstant at the specified index.getRefClassName(int constantIndex) Returns the class name of the RefConstant at the specified index.getRefName(int constantIndex) Returns the name of the RefConstant at the specified index.getRefType(int constantIndex) Returns the type of the RefConstant at the specified index.getString(int constantIndex) Returns the String value of the Utf8Constant at the specified index.getStringString(int constantIndex) Returns the String value of the StringConstant at the specified index.Returns the super class of this class.Returns the full internal name of the super class of this class, or null if this class represents java.lang.Object.intgetTag(int constantIndex) Returns the tag value of the Constant at the specified index.getType(int constantIndex) Returns the type of the NameAndTypeConstant at the specified index.voidhierarchyAccept(boolean visitThisClass, boolean visitSuperClass, boolean visitInterfaces, boolean visitSubclasses, ClassVisitor classVisitor) Accepts the given class visitor in the class hierarchy.voidinterfaceConstantsAccept(ConstantVisitor constantVisitor) Lets the given constant pool entry visitor visit the class constant pool entries for all interfaces of this class.voidkotlinMetadataAccept(KotlinMetadataVisitor kotlinMetadataVisitor) Lets the given Kotlin metadata visitor visit the metadata of this class.booleanmayHaveImplementations(Method method) Returns whether the given method may possibly have implementing or overriding methods down the class hierarchy.voidmethodAccept(String name, String descriptor, MemberVisitor memberVisitor) Lets the given member info visitor visit the specified method.voidmethodsAccept(MemberVisitor memberVisitor) Lets the given member info visitor visit all methods of this class.voidremoveSubClass(Clazz clazz) Notifies this Clazz that it is no longer being subclassed by another class.voidsubclassesAccept(ClassVisitor classVisitor) Lets the given class visitor visit all known subclasses.voidsuperClassConstantAccept(ConstantVisitor constantVisitor) Lets the given constant pool entry visitor visit the class constant pool entry of the super class of this class, if there is one.voidthisClassConstantAccept(ConstantVisitor constantVisitor) Lets the given constant pool entry visitor visit the class constant pool entry of this class.Methods inherited from interface proguard.util.FeatureNamed
addExtraFeatureName, getExtraFeatureNames, getFeatureName, isInFeature, setFeatureNameMethods inherited from interface proguard.util.Processable
accept, addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
-
Method Details
-
getAccessFlags
int getAccessFlags()Returns the access flags of this class.- See Also:
-
getName
String getName()Returns the full internal name of this class. -
getSuperName
String getSuperName()Returns the full internal name of the super class of this class, or null if this class represents java.lang.Object. -
getInterfaceCount
int getInterfaceCount()Returns the number of interfaces that this class implements. -
getInterfaceName
Returns the full internal name of the interface at the given index of this class. -
getTag
int getTag(int constantIndex) Returns the tag value of the Constant at the specified index. -
getString
Returns the String value of the Utf8Constant at the specified index. -
getStringString
Returns the String value of the StringConstant at the specified index. -
getClassName
Returns the class name of ClassConstant at the specified index. -
getName
Returns the name of the NameAndTypeConstant at the specified index. -
getType
Returns the type of the NameAndTypeConstant at the specified index. -
getRefClassName
Returns the class name of the RefConstant at the specified index. -
getRefName
Returns the name of the RefConstant at the specified index. -
getRefType
Returns the type of the RefConstant at the specified index. -
getModuleName
Returns the name of the ModuleConstant at the specified index. -
getPackageName
Returns the name of the PackageConstant at the specified index. -
addSubClass
Notifies this Clazz that it is being subclassed by another class. -
removeSubClass
Notifies this Clazz that it is no longer being subclassed by another class. -
getSuperClass
Clazz getSuperClass()Returns the super class of this class. -
getInterface
Returns the interface at the given index. -
extends_
Returns whether this class extends the given class. A class is always considered to extend itself. Interfaces are considered to only extend the root Object class. -
extends_
Returns whether this class extends the specified class. A class is always considered to extend itself. Interfaces are considered to only extend the root Object class. -
extendsOrImplements
Returns whether this class implements the given class. A class is always considered to implement itself. Interfaces are considered to implement all their superinterfaces. -
extendsOrImplements
Returns whether this class implements the specified class. A class is always considered to implement itself. Interfaces are considered to implement all their superinterfaces. -
findField
Returns the field with the given name and descriptor.- Parameters:
name- the field name, or null if it is irrelevant.descriptor- the field type, or null if it is irrelevant.- Returns:
- the first matching field, or null there is no matching field.
-
findMethod
Returns the method with the given name and descriptor.- Parameters:
name- the method name, or null if it is irrelevant.descriptor- the method descriptor, or null if it is irrelevant.- Returns:
- the first matching method, or null there is no matching method.
-
accept
Accepts the given class visitor. -
hierarchyAccept
void hierarchyAccept(boolean visitThisClass, boolean visitSuperClass, boolean visitInterfaces, boolean visitSubclasses, ClassVisitor classVisitor) Accepts the given class visitor in the class hierarchy.- Parameters:
visitThisClass- specifies whether to visit this class.visitSuperClass- specifies whether to visit the super classes.visitInterfaces- specifies whether to visit the interfaces.visitSubclasses- specifies whether to visit the subclasses.classVisitor- theClassVisitorthat will visit the class hierarchy.
-
subclassesAccept
Lets the given class visitor visit all known subclasses.- Parameters:
classVisitor- theClassVisitorthat will visit the subclasses.
-
constantPoolEntriesAccept
Lets the given constant pool entry visitor visit all constant pool entries of this class. -
constantPoolEntryAccept
Lets the given constant pool entry visitor visit the constant pool entry at the specified index. -
thisClassConstantAccept
Lets the given constant pool entry visitor visit the class constant pool entry of this class. -
superClassConstantAccept
Lets the given constant pool entry visitor visit the class constant pool entry of the super class of this class, if there is one. -
interfaceConstantsAccept
Lets the given constant pool entry visitor visit the class constant pool entries for all interfaces of this class. -
fieldsAccept
Lets the given member info visitor visit all fields of this class. -
fieldAccept
Lets the given member info visitor visit the specified field. -
methodsAccept
Lets the given member info visitor visit all methods of this class. -
methodAccept
Lets the given member info visitor visit the specified method. -
mayHaveImplementations
Returns whether the given method may possibly have implementing or overriding methods down the class hierarchy. This can only be true if the class is not final, and the method is not private, static, or final, or a constructor.- Parameters:
method- the method that may have implementations.- Returns:
- whether it may have implementations.
-
attributesAccept
Lets the given attribute info visitor visit all attributes of this class. -
attributeAccept
Lets the given attribute info visitor visit the specified attribute. -
kotlinMetadataAccept
Lets the given Kotlin metadata visitor visit the metadata of this class.
-