Package proguard.classfile.util
Class ClassInitializer
- java.lang.Object
-
- proguard.classfile.util.ClassInitializer
-
- All Implemented Interfaces:
ClassVisitor
public class ClassInitializer extends java.lang.Object implements ClassVisitor
ThisClassVisitor
initializes the class hierarchy and references of all classes that it visits. It assumes that the class hierarchies of the classes to which it refers have already been initialized. Otherwise, you need to call subsequently callClassSuperHierarchyInitializer
,ClassSubHierarchyInitializer
, andClassReferenceInitializer
on all classes.
-
-
Constructor Summary
Constructors Constructor Description ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool)
Creates a new ClassInitializer that initializes the class hierarchies and references of all visited class files.ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, boolean checkAccessRules, InvalidReferenceVisitor invalidReferenceVisitor, InvalidClassReferenceVisitor invalidClassReferenceVisitor)
Creates a new ClassInitializer that initializes the references of all visited class files, optionally visiting the providedInvalidReferenceVisitor
orInvalidClassReferenceVisitor
for any invalid references.ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, boolean checkAccessRules, WarningPrinter missingClassWarningPrinter, WarningPrinter missingProgramMemberWarningPrinter, WarningPrinter missingLibraryMemberWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassInitializer that initializes the references of all visited class files, optionally printing warnings if some classes or class members can't be found or if they are in the program class pool.ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, WarningPrinter missingClassWarningPrinter, WarningPrinter missingProgramMemberWarningPrinter, WarningPrinter missingLibraryMemberWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassInitializer that initializes the class hierarchies and references of all visited class files, optionally printing warnings if some classes or class members 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.visitor.ClassVisitor
visitLibraryClass, visitProgramClass
-
-
-
-
Constructor Detail
-
ClassInitializer
public ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool)
Creates a new ClassInitializer that initializes the class hierarchies and references of all visited class files.
-
ClassInitializer
public ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, WarningPrinter missingClassWarningPrinter, WarningPrinter missingProgramMemberWarningPrinter, WarningPrinter missingLibraryMemberWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassInitializer that initializes the class hierarchies and references of all visited class files, optionally printing warnings if some classes or class members can't be found or if they are in the program class pool.
-
ClassInitializer
public ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, boolean checkAccessRules, WarningPrinter missingClassWarningPrinter, WarningPrinter missingProgramMemberWarningPrinter, WarningPrinter missingLibraryMemberWarningPrinter, WarningPrinter dependencyWarningPrinter)
Creates a new ClassInitializer that initializes the references of all visited class files, optionally printing warnings if some classes or class members can't be found or if they are in the program class pool.
-
ClassInitializer
public ClassInitializer(ClassPool programClassPool, ClassPool libraryClassPool, boolean checkAccessRules, InvalidReferenceVisitor invalidReferenceVisitor, InvalidClassReferenceVisitor invalidClassReferenceVisitor)
Creates a new ClassInitializer that initializes the references of all visited class files, optionally visiting the providedInvalidReferenceVisitor
orInvalidClassReferenceVisitor
for any invalid 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
-
-