FileDocCategorySizeDatePackage
ClassAPI.javaAPI DocAndroid 1.5 API2675Wed May 06 22:41:22 BST 2009jdiff

ClassAPI

public class ClassAPI extends Object implements Comparable
Class to represent a class, analogous to ClassDoc in the Javadoc doclet API. The method used for Collection comparison (compareTo) must make its comparison based upon everything that is known about this class. See the file LICENSE.txt for copyright details.
author
Matthew Doar, mdoar@pobox.com

Fields Summary
public String
name_
Name of the class, not fully qualified.
public boolean
isInterface_
Set if this class is an interface.
boolean
isAbstract_
Set if this class is abstract.
public Modifiers
modifiers_
Modifiers for this class.
public String
extends_
Name of the parent class, or null if there is no parent.
public List
implements_
Interfaces implemented by this class.
public List
ctors_
Constructors in this class.
public List
methods_
Methods in this class.
public List
fields_
Fields in this class.
public String
doc_
The doc block, default is null.
Constructors Summary
public ClassAPI(String name, String parent, boolean isInterface, boolean isAbstract, Modifiers modifiers)
Constructor.


      
           
                        
        name_ = name;
        extends_ = parent;
        isInterface_ = isInterface;
        isAbstract_ = isAbstract;
        modifiers_ = modifiers;

        implements_ = new ArrayList(); // String[]
        ctors_ = new ArrayList(); // ConstructorAPI[]
        methods_ = new ArrayList(); // MethodAPI[]
        fields_ = new ArrayList(); // FieldAPI[]
    
Methods Summary
public intcompareTo(java.lang.Object o)
Compare two ClassAPI objects by all the known information.

        ClassAPI oClassAPI = (ClassAPI)o;
        int comp = name_.compareTo(oClassAPI.name_);
        if (comp != 0)
            return comp;
        if (isInterface_ != oClassAPI.isInterface_)
            return -1;
        if (isAbstract_ != oClassAPI.isAbstract_)
            return -1;
        comp = modifiers_.compareTo(oClassAPI.modifiers_);
        if (comp != 0)
            return comp;
        if (APIComparator.docChanged(doc_, oClassAPI.doc_))
            return -1;
        return 0;
    
public booleanequals(java.lang.Object o)
Tests two methods for equality using just the class name, used by indexOf().

        if (name_.compareTo(((ClassAPI)o).name_) == 0)
            return true;
        return false;