Class ClassSuperHierarchyInitializer

  • All Implemented Interfaces:
    ConstantVisitor, ClassVisitor

    public class ClassSuperHierarchyInitializer
    extends java.lang.Object
    implements ClassVisitor, ConstantVisitor
    This 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 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 given InvalidClassReferenceVisitor for any broken references.