Class ClassHierarchyStore

  • All Implemented Interfaces:
    ClassHierarchyProvider

    public final class ClassHierarchyStore
    extends Object
    implements ClassHierarchyProvider
    This implementation of ClassHierarchyProvider is a simple writable data structure representing a class hierarchy. You call setClassInfo to record information about a class.
    • Constructor Detail

      • ClassHierarchyStore

        public ClassHierarchyStore()
        Create an empty store.
    • Method Detail

      • setClassInfo

        public void setClassInfo​(String cl,
                                 boolean isInterface,
                                 boolean isFinal,
                                 String superClass,
                                 String[] superInterfaces)
                          throws IllegalArgumentException
        Append some class information to the store.
        Parameters:
        cl - the JVM type of the class being added (e.g., Ljava/lang/Object;)
        isInterface - true iff it's an interface
        isFinal - true iff it's final
        superClass - the JVM type of the superclass, or null if this is Object
        superInterfaces - the JVM types of its implemented interfaces
        Throws:
        IllegalArgumentException
      • removeClassInfo

        public void removeClassInfo​(String cl)
        Delete the class information from the store.
      • iterateOverClasses

        public Iterator<String> iterateOverClasses()
        Iterate through all classes in the store.
      • getSubClasses

        public String[] getSubClasses​(String cl)
        Specified by:
        getSubClasses in interface ClassHierarchyProvider
        Returns:
        the complete set of direct subclasses or implementors of cl, or null if the complete set is not known