Package proguard.classfile.util
Class ClassSuperHierarchyInitializer
- java.lang.Object
-
- proguard.classfile.util.ClassSuperHierarchyInitializer
-
- All Implemented Interfaces:
ConstantVisitor
,ClassVisitor
public class ClassSuperHierarchyInitializer extends java.lang.Object implements ClassVisitor, ConstantVisitor
ThisClassVisitor
initializes the superclass hierarchy of all classes that it visits.Visited library classes get direct references to their superclasses and interfaces, replacing the superclass names and interface names. The direct references are equivalent to the names, but they are more efficient to work with.
This visitor optionally prints warnings if some superclasses can't be found or if they are in the program class pool.
-
-
Constructor Summary
Constructors Constructor Description ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files.ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, InvalidClassReferenceVisitor invalidClassReferenceVisitor)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files, visiting the givenInvalidClassReferenceVisitor
for any broken references.ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, WarningPrinter missingWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files, optionally printing warnings if some classes can't be found or if they are in the program class pool.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.void
visitClassConstant(Clazz clazz, ClassConstant classConstant)
void
visitLibraryClass(LibraryClass libraryClass)
void
visitProgramClass(ProgramClass programClass)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant
-
-
-
-
Constructor Detail
-
ClassSuperHierarchyInitializer
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files.
-
ClassSuperHierarchyInitializer
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, WarningPrinter missingWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files, optionally printing warnings if some classes can't be found or if they are in the program class pool.
-
ClassSuperHierarchyInitializer
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, InvalidClassReferenceVisitor invalidClassReferenceVisitor)
Creates a new ClassSuperHierarchyInitializer that initializes the super hierarchy of all visited class files, visiting the givenInvalidClassReferenceVisitor
for any broken references.
-
-
Method Detail
-
visitAnyClass
public void visitAnyClass(Clazz clazz)
Description copied from interface:ClassVisitor
Visits any Clazz instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyClass
in interfaceClassVisitor
-
visitProgramClass
public void visitProgramClass(ProgramClass programClass)
- Specified by:
visitProgramClass
in interfaceClassVisitor
-
visitLibraryClass
public void visitLibraryClass(LibraryClass libraryClass)
- Specified by:
visitLibraryClass
in interfaceClassVisitor
-
visitClassConstant
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
- Specified by:
visitClassConstant
in interfaceConstantVisitor
-
-