Class ClassTree


  • @Deprecated
    public class ClassTree
    extends java.lang.Object
    Deprecated.
    Build Class Hierarchy for all the Classes. This class builds the Class Tree and the Interface Tree separately.

    This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.

    See Also:
    HashMap, List, Type, ClassDoc
    • Field Detail

      • baseclasses

        private final java.util.SortedSet<ClassDoc> baseclasses
        Deprecated.
        List of baseclasses. Contains only java.lang.Object. Can be used to get the mapped listing of sub-classes.
      • subclasses

        private final java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> subclasses
        Deprecated.
        Mapping for each Class with their SubClasses
      • baseinterfaces

        private final java.util.SortedSet<ClassDoc> baseinterfaces
        Deprecated.
        List of base-interfaces. Contains list of all the interfaces who do not have super-interfaces. Can be used to get the mapped listing of sub-interfaces.
      • subinterfaces

        private final java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> subinterfaces
        Deprecated.
        Mapping for each Interface with their SubInterfaces
      • baseEnums

        private final java.util.SortedSet<ClassDoc> baseEnums
        Deprecated.
      • subEnums

        private final java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> subEnums
        Deprecated.
      • baseAnnotationTypes

        private final java.util.SortedSet<ClassDoc> baseAnnotationTypes
        Deprecated.
      • subAnnotationTypes

        private final java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> subAnnotationTypes
        Deprecated.
      • implementingclasses

        private final java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> implementingclasses
        Deprecated.
        Mapping for each Interface with classes who implement it.
      • configuration

        private final Configuration configuration
        Deprecated.
      • utils

        private final Utils utils
        Deprecated.
      • comparator

        private final java.util.Comparator<Doc> comparator
        Deprecated.
    • Constructor Detail

      • ClassTree

        public ClassTree​(Configuration configuration,
                         boolean noDeprecated)
        Deprecated.
        Constructor. Build the Tree using the Root of this Javadoc run.
        Parameters:
        configuration - the configuration of the doclet.
        noDeprecated - Don't add deprecated classes in the class tree, if true.
      • ClassTree

        public ClassTree​(RootDoc root,
                         Configuration configuration)
        Deprecated.
        Constructor. Build the Tree using the Root of this Javadoc run.
        Parameters:
        root - Root of the Document.
        configuration - The current configuration of the doclet.
      • ClassTree

        public ClassTree​(ClassDoc[] classes,
                         Configuration configuration)
        Deprecated.
        Constructor. Build the tree for the given array of classes.
        Parameters:
        classes - Array of classes.
        configuration - The current configuration of the doclet.
    • Method Detail

      • buildTree

        private void buildTree​(ClassDoc[] classes)
        Deprecated.
        Generate mapping for the sub-classes for every class in this run. Return the sub-class list for java.lang.Object which will be having sub-class listing for itself and also for each sub-class itself will have their own sub-class lists.
        Parameters:
        classes - all the classes in this run.
        configuration - the current configuration of the doclet.
      • processType

        private void processType​(ClassDoc cd,
                                 Configuration configuration,
                                 java.util.Collection<ClassDoc> bases,
                                 java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> subs)
        Deprecated.
        For the class passed map it to it's own sub-class listing. For the Class passed, get the super class, if superclass is non null, (it is not "java.lang.Object") get the "value" from the hashmap for this key Class if entry not found create one and get that. add this Class as a sub class in the list Recurse till hits java.lang.Object Null SuperClass.
        Parameters:
        cd - class for which sub-class mapping to be generated.
        configuration - the current configurtation of the doclet.
      • processInterface

        private void processInterface​(ClassDoc cd)
        Deprecated.
        For the interface passed get the interfaces which it extends, and then put this interface in the sub-interface list of those interfaces. Do it recursively. If a interface doesn't have super-interface just attach that interface in the list of all the baseinterfaces.
        Parameters:
        cd - Interface under consideration.
      • add

        private boolean add​(java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> map,
                            ClassDoc superclass,
                            ClassDoc cd)
        Deprecated.
        Adjust the Class Tree. Add the class interface in to it's super-class' or super-interface's sub-interface list.
        Parameters:
        map - the entire map.
        superclass - java.lang.Object or the super-interface.
        cd - sub-interface to be mapped.
      • get

        private java.util.SortedSet<ClassDoc> get​(java.util.Map<ClassDoc,​java.util.SortedSet<ClassDoc>> map,
                                                  ClassDoc cd)
        Deprecated.
        From the map return the list of sub-classes or sub-interfaces. If list is null create a new one and return it.
        Parameters:
        map - The entire map.
        cd - class for which the sub-class list is requested.
      • subclasses

        public java.util.SortedSet<ClassDoc> subclasses​(ClassDoc cd)
        Deprecated.
        Return the sub-class list for the class passed.
        Parameters:
        cd - class whose sub-class list is required.
      • subinterfaces

        public java.util.SortedSet<ClassDoc> subinterfaces​(ClassDoc cd)
        Deprecated.
        Return the sub-interface list for the interface passed.
        Parameters:
        cd - interface whose sub-interface list is required.
      • implementingclasses

        public java.util.SortedSet<ClassDoc> implementingclasses​(ClassDoc cd)
        Deprecated.
        Return the list of classes which implement the interface passed.
        Parameters:
        cd - interface whose implementing-classes list is required.
      • subs

        public java.util.SortedSet<ClassDoc> subs​(ClassDoc cd,
                                                  boolean isEnum)
        Deprecated.
        Return the sub-class/interface list for the class/interface passed.
        Parameters:
        cd - class/interface whose sub-class/interface list is required.
        isEnum - true if the subclasses should be forced to come from the enum tree.
      • allSubs

        public java.util.SortedSet<ClassDoc> allSubs​(ClassDoc cd,
                                                     boolean isEnum)
        Deprecated.
        Return a list of all direct or indirect, sub-classes and subinterfaces of the ClassDoc argument.
        Parameters:
        cd - ClassDoc whose sub-classes or sub-interfaces are requested.
        isEnum - true if the subclasses should be forced to come from the enum tree.
      • baseclasses

        public java.util.SortedSet<ClassDoc> baseclasses()
        Deprecated.
        Return the base-classes list. This will have only one element namely thw classdoc for java.lang.Object, since this is the base class for all classes.
      • baseinterfaces

        public java.util.SortedSet<ClassDoc> baseinterfaces()
        Deprecated.
        Return the list of base interfaces. This is the list of interfaces which do not have super-interface.
      • baseEnums

        public java.util.SortedSet<ClassDoc> baseEnums()
        Deprecated.
        Return the list of base enums. This is the list of enums which do not have super-enums.
      • baseAnnotationTypes

        public java.util.SortedSet<ClassDoc> baseAnnotationTypes()
        Deprecated.
        Return the list of base annotation types. This is the list of annotation types which do not have super-annotation types.