public class ClassSuperHierarchyInitializer extends java.lang.Object implements ClassVisitor, ConstantVisitor
ClassVisitor
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 and 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 given
InvalidClassReferenceVisitor 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.
|
Modifier and Type | Method and Description |
---|---|
void |
visitAnyClass(Clazz clazz)
Visits any Clazz instance.
|
void |
visitClassConstant(Clazz clazz,
ClassConstant classConstant) |
void |
visitLibraryClass(LibraryClass libraryClass) |
void |
visitProgramClass(ProgramClass programClass) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool)
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, WarningPrinter missingWarningPrinter, WarningPrinter dependencyWarningPrinter)
public ClassSuperHierarchyInitializer(ClassPool programClassPool, ClassPool libraryClassPool, InvalidClassReferenceVisitor invalidClassReferenceVisitor)
InvalidClassReferenceVisitor
for any broken
references.public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitLibraryClass(LibraryClass libraryClass)
visitLibraryClass
in interface ClassVisitor
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
visitClassConstant
in interface ConstantVisitor