FileDocCategorySizeDatePackage
DeprecatedAPIListBuilder.javaAPI DocExample4680Wed Apr 19 11:17:12 BST 2000com.sun.tools.doclets.standard

DeprecatedAPIListBuilder

public class DeprecatedAPIListBuilder extends Object
Build list of all the deprecated classes, constructors, fields and methods.
author
Atul M Dambalkar

Fields Summary
private List
deprecatedclasses
List of all the deprecated classes.
private List
deprecatedinterfaces
List of all the deprecated interfaces.
private List
deprecatedexceptions
List of all the deprecated exceptions.
private List
deprecatederrors
List of all the deprecated errors.
private List
deprecatedfields
List of all the deprecated fields.
private List
deprecatedmethods
List of all the deprecated methods.
private List
deprecatedconstructors
List of all the deprecated constructors.
Constructors Summary
public DeprecatedAPIListBuilder(RootDoc root)
Constructor.

param
root Root of the tree.


                
       
        buildDeprecatedAPIInfo(root);
    
Methods Summary
private voidbuildDeprecatedAPIInfo(com.sun.javadoc.RootDoc root)
Build the sorted list of all the deprecated APIs in this run. Build separate lists for deprecated classes, constructors, methods and fields.

param
root Root of the tree.

        ClassDoc[] classes = root.classes();
        for (int i = 0; i < classes.length; i++) {
            ClassDoc cd = classes[i];
            if (cd.tags("deprecated").length > 0) {
                if (cd.isOrdinaryClass()) {
                    deprecatedclasses.add(cd);
                } else if (cd.isInterface()) {
                    deprecatedinterfaces.add(cd);
                } else if (cd.isException()) {
                    deprecatedexceptions.add(cd);
                } else {
                    deprecatederrors.add(cd);
                }
            }
            composeDeprecatedList(deprecatedfields, cd.fields());
            composeDeprecatedList(deprecatedmethods, cd.methods());
            composeDeprecatedList(deprecatedconstructors, cd.constructors());
        }
        sortDeprecatedLists(); 
    
private voidcomposeDeprecatedList(java.util.List list, com.sun.javadoc.MemberDoc[] members)
Add the members into a single list of deprecated members.

param
list List of all the particular deprecated members, e.g. methods.
param
members members to be added in the list.

 
        for (int i = 0; i < members.length; i++) {
            if (members[i].tags("deprecated").length > 0) {
                list.add(members[i]);
            }
        }
    
public java.util.ListgetDeprecatedClasses()
Return the list of deprecated classes.

        return deprecatedclasses;
    
public java.util.ListgetDeprecatedConstructors()
Return the list of deprecated constructors.

        return deprecatedconstructors;
    
public java.util.ListgetDeprecatedErrors()
Return the list of deprecated errors.

        return deprecatederrors;
    
public java.util.ListgetDeprecatedExceptions()
Return the list of deprecated exceptions.

        return deprecatedexceptions;
    
public java.util.ListgetDeprecatedFields()
Return the list of deprecated fields.

        return deprecatedfields;
    
public java.util.ListgetDeprecatedInterfaces()
Return the list of deprecated interfaces.

        return deprecatedinterfaces;
    
public java.util.ListgetDeprecatedMethods()
Return the list of deprecated methods.

        return deprecatedmethods;
    
private voidsortDeprecatedLists()
Sort the deprecated lists for class kinds, fields, methods and constructors.

        Collections.sort(deprecatedclasses);
        Collections.sort(deprecatedinterfaces);
        Collections.sort(deprecatedexceptions);
        Collections.sort(deprecatederrors);
        Collections.sort(deprecatedfields);
        Collections.sort(deprecatedmethods);
        Collections.sort(deprecatedconstructors);