com.google.doclava
Class ClassInfo

java.lang.Object
  extended by com.google.doclava.DocInfo
      extended by com.google.doclava.ClassInfo
All Implemented Interfaces:
ContainerInfo, Scoped, Comparable

public class ClassInfo
extends DocInfo
implements ContainerInfo, Comparable, Scoped


Field Summary
static Comparator<ClassInfo> comparator
           
static Comparator<ClassInfo> qualifiedComparator
           
 
Constructor Summary
ClassInfo(com.sun.javadoc.ClassDoc cl, String rawCommentText, SourcePositionInfo position, boolean isPublic, boolean isProtected, boolean isPackagePrivate, boolean isPrivate, boolean isStatic, boolean isInterface, boolean isAbstract, boolean isOrdinaryClass, boolean isException, boolean isError, boolean isEnum, boolean isAnnotation, boolean isFinal, boolean isIncluded, String name, String qualifiedName, String qualifiedTypeName, boolean isPrimitive)
           
ClassInfo(String qualifiedName)
          Constructs a stub representation of a class.
 
Method Summary
 void addConstructor(ConstructorInfo cInfo)
           
 void addField(FieldInfo fInfo)
           
 void addInterface(ClassInfo iface)
           
 void addMethod(MethodInfo method)
           
 MethodInfo[] allConstructors()
           
 Map<String,ConstructorInfo> allConstructorsMap()
           
 Map<String,FieldInfo> allFields()
           
 Map<String,MethodInfo> allMethods()
          Returns all methods defined directly in this class.
 FieldInfo[] allSelfFields()
           
 MethodInfo[] allSelfMethods()
           
 MethodInfo[] annotationElements()
           
 AnnotationInstanceInfo[] annotations()
           
 TypeInfo asTypeInfo()
           
 boolean checkLevel()
           
 int compareTo(Object that)
           
 MethodInfo[] constructors()
           
 ClassInfo containingClass()
           
 PackageInfo containingPackage()
           
 boolean containsMethod(MethodInfo method)
          Returns true if the given method's signature is available in this class, either directly or via inheritance.
 TagInfo[] deprecatedTags()
           
 FieldInfo[] enumConstants()
           
 boolean equals(ClassInfo that)
           
 ClassInfo extendedFindClass(String className)
           
 FieldInfo[] fields()
           
 ClassInfo findClass(String className)
           
 FieldInfo findField(String name)
           
 ClassInfo findInnerClass(String className)
           
 MethodInfo findMethod(String name, String[] params, String[] dimensions, boolean varargs)
           
 TagInfo[] firstSentenceTags()
           
 void gatherFields(ClassInfo owner, ClassInfo cl, HashMap<String,FieldInfo> fields)
           
 MethodInfo[] getHiddenMethods()
           
 ClassInfo[] getInterfaces()
           
 MethodInfo[] getNonWrittenConstructors()
           
 ClassInfo[] getRealInnerClasses()
           
 String getReasonIncluded()
           
 String getSource()
           
 TypeInfo[] getTypeParameters()
           
 boolean hasConstructor(MethodInfo constructor)
           
 Iterable<ClassInfo> hierarchy()
          Returns the class hierarchy for this class, starting with this class.
 void init(TypeInfo typeInfo, ClassInfo[] interfaces, TypeInfo[] interfaceTypes, ClassInfo[] innerClasses, MethodInfo[] constructors, MethodInfo[] methods, MethodInfo[] annotationElements, FieldInfo[] fields, FieldInfo[] enumConstants, PackageInfo containingPackage, ClassInfo containingClass, ClassInfo superclass, TypeInfo superclassType, AnnotationInstanceInfo[] annotations)
           
 void init2()
           
 void init3(TypeInfo[] types, ClassInfo[] realInnerClasses)
           
 TagInfo[] inlineTags()
           
 ClassInfo[] innerClasses()
           
static MethodInfo interfaceMethod(MethodInfo candidate, ClassInfo newClassObj)
           
 boolean isAbstract()
           
 boolean isAnnotation()
           
 boolean isConsistent(ClassInfo cl)
           
 boolean isDefinedLocally()
          Returns true if the class represented by this object is defined locally, and thus will be included in local documentation.
 boolean isDeprecated()
           
 boolean isDerivedFrom(ClassInfo cl)
          Even indirectly
 boolean isEnum()
           
 boolean isError()
           
 boolean isException()
           
 boolean isFinal()
           
 boolean isHidden()
           
 boolean isHiddenImpl()
           
 boolean isInterface()
           
 boolean isOrdinaryClass()
           
 boolean isPackagePrivate()
           
 boolean isPrimitive()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 String kind()
           
 String leafName()
           
 void makeHDF(com.google.clearsilver.jsilver.data.Data data)
          Turns into the main class page
 void makeKeywordEntries(List<com.google.doclava.KeywordEntry> keywords)
           
static void makeLinkListHDF(com.google.clearsilver.jsilver.data.Data data, String base, ClassInfo[] classes)
           
 void makeShortDescrHDF(com.google.clearsilver.jsilver.data.Data data, String base)
          Used in lists of this class (packages, nested classes, known subclasses)
 MethodInfo[] methods()
           
 String name()
           
 String[] nameParts()
           
static MethodInfo overriddenMethod(MethodInfo candidate, ClassInfo newClassObj)
           
 ContainerInfo parent()
           
 String qualifiedName()
           
 String qualifiedTypeName()
           
 ClassInfo[] realInterfaces()
           
 ClassInfo realSuperclass()
           
 String relativePath()
          Returns the relative path that represents this item on a documentation source.
 String relativePath(String suffix)
           
 String scope()
           
 AttributeInfo[] selfAttributes()
           
 FieldInfo[] selfFields()
           
 MethodInfo[] selfMethods()
           
 void setAnnotations(AnnotationInstanceInfo[] annotations)
           
 void setContainingPackage(PackageInfo pkg)
           
 void setHiddenMethods(MethodInfo[] mInfo)
           
 void setNonWrittenConstructors(MethodInfo[] nonWritten)
           
 void setReasonIncluded(String reason)
           
 void setSuperClass(ClassInfo superclass)
           
 void setTypeInfo(TypeInfo typeInfo)
           
static ClassInfo[] sortByName(ClassInfo[] classes)
           
 ClassInfo superclass()
           
 String superclassName()
           
 TypeInfo superclassType()
          always the real superclass, not the collapsed one we get through superclass(), also has the type parameter info if it's generic.
 String toString()
           
 HashSet<String> typeVariables()
           
 
Methods inherited from class com.google.doclava.DocInfo
addFederatedReference, comment, getFederatedReferences, getRawCommentText, getSince, htmlPage, isDocOnly, position, setFederatedReferences, setSince
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comparator

public static final Comparator<ClassInfo> comparator

qualifiedComparator

public static final Comparator<ClassInfo> qualifiedComparator
Constructor Detail

ClassInfo

public ClassInfo(String qualifiedName)
Constructs a stub representation of a class.


ClassInfo

public ClassInfo(com.sun.javadoc.ClassDoc cl,
                 String rawCommentText,
                 SourcePositionInfo position,
                 boolean isPublic,
                 boolean isProtected,
                 boolean isPackagePrivate,
                 boolean isPrivate,
                 boolean isStatic,
                 boolean isInterface,
                 boolean isAbstract,
                 boolean isOrdinaryClass,
                 boolean isException,
                 boolean isError,
                 boolean isEnum,
                 boolean isAnnotation,
                 boolean isFinal,
                 boolean isIncluded,
                 String name,
                 String qualifiedName,
                 String qualifiedTypeName,
                 boolean isPrimitive)
Method Detail

init

public void init(TypeInfo typeInfo,
                 ClassInfo[] interfaces,
                 TypeInfo[] interfaceTypes,
                 ClassInfo[] innerClasses,
                 MethodInfo[] constructors,
                 MethodInfo[] methods,
                 MethodInfo[] annotationElements,
                 FieldInfo[] fields,
                 FieldInfo[] enumConstants,
                 PackageInfo containingPackage,
                 ClassInfo containingClass,
                 ClassInfo superclass,
                 TypeInfo superclassType,
                 AnnotationInstanceInfo[] annotations)

init2

public void init2()

init3

public void init3(TypeInfo[] types,
                  ClassInfo[] realInnerClasses)

getRealInnerClasses

public ClassInfo[] getRealInnerClasses()

getTypeParameters

public TypeInfo[] getTypeParameters()

checkLevel

public boolean checkLevel()
Specified by:
checkLevel in interface ContainerInfo

compareTo

public int compareTo(Object that)
Specified by:
compareTo in interface Comparable

parent

public ContainerInfo parent()
Specified by:
parent in class DocInfo

isPublic

public boolean isPublic()
Specified by:
isPublic in interface Scoped

isProtected

public boolean isProtected()
Specified by:
isProtected in interface Scoped

isPackagePrivate

public boolean isPackagePrivate()
Specified by:
isPackagePrivate in interface Scoped

isPrivate

public boolean isPrivate()
Specified by:
isPrivate in interface Scoped

isStatic

public boolean isStatic()

isInterface

public boolean isInterface()

isAbstract

public boolean isAbstract()

containingPackage

public PackageInfo containingPackage()

containingClass

public ClassInfo containingClass()

isOrdinaryClass

public boolean isOrdinaryClass()

isException

public boolean isException()

isError

public boolean isError()

isEnum

public boolean isEnum()

isAnnotation

public boolean isAnnotation()

isFinal

public boolean isFinal()

isDefinedLocally

public boolean isDefinedLocally()
Returns true if the class represented by this object is defined locally, and thus will be included in local documentation.

Specified by:
isDefinedLocally in class DocInfo

typeVariables

public HashSet<String> typeVariables()

getInterfaces

public ClassInfo[] getInterfaces()

realInterfaces

public ClassInfo[] realInterfaces()

name

public String name()

nameParts

public String[] nameParts()

leafName

public String leafName()

qualifiedName

public String qualifiedName()
Specified by:
qualifiedName in interface ContainerInfo

qualifiedTypeName

public String qualifiedTypeName()

isPrimitive

public boolean isPrimitive()

allConstructors

public MethodInfo[] allConstructors()

constructors

public MethodInfo[] constructors()

innerClasses

public ClassInfo[] innerClasses()

inlineTags

public TagInfo[] inlineTags()

firstSentenceTags

public TagInfo[] firstSentenceTags()

isDeprecated

public boolean isDeprecated()

deprecatedTags

public TagInfo[] deprecatedTags()

methods

public MethodInfo[] methods()

annotationElements

public MethodInfo[] annotationElements()

annotations

public AnnotationInstanceInfo[] annotations()

fields

public FieldInfo[] fields()

gatherFields

public void gatherFields(ClassInfo owner,
                         ClassInfo cl,
                         HashMap<String,FieldInfo> fields)

selfFields

public FieldInfo[] selfFields()

allSelfFields

public FieldInfo[] allSelfFields()

selfMethods

public MethodInfo[] selfMethods()

allSelfMethods

public MethodInfo[] allSelfMethods()

addMethod

public void addMethod(MethodInfo method)

setContainingPackage

public void setContainingPackage(PackageInfo pkg)

selfAttributes

public AttributeInfo[] selfAttributes()

enumConstants

public FieldInfo[] enumConstants()

superclass

public ClassInfo superclass()

realSuperclass

public ClassInfo realSuperclass()

superclassType

public TypeInfo superclassType()
always the real superclass, not the collapsed one we get through superclass(), also has the type parameter info if it's generic.


asTypeInfo

public TypeInfo asTypeInfo()

relativePath

public String relativePath()
Description copied from class: DocInfo
Returns the relative path that represents this item on a documentation source.

Specified by:
relativePath in class DocInfo

relativePath

public String relativePath(String suffix)

isDerivedFrom

public boolean isDerivedFrom(ClassInfo cl)
Even indirectly


makeKeywordEntries

public void makeKeywordEntries(List<com.google.doclava.KeywordEntry> keywords)

makeLinkListHDF

public static void makeLinkListHDF(com.google.clearsilver.jsilver.data.Data data,
                                   String base,
                                   ClassInfo[] classes)

makeShortDescrHDF

public void makeShortDescrHDF(com.google.clearsilver.jsilver.data.Data data,
                              String base)
Used in lists of this class (packages, nested classes, known subclasses)


makeHDF

public void makeHDF(com.google.clearsilver.jsilver.data.Data data)
Turns into the main class page


isHidden

public boolean isHidden()
Specified by:
isHidden in interface Scoped
Overrides:
isHidden in class DocInfo

isHiddenImpl

public boolean isHiddenImpl()

findMethod

public MethodInfo findMethod(String name,
                             String[] params,
                             String[] dimensions,
                             boolean varargs)

containsMethod

public boolean containsMethod(MethodInfo method)
Returns true if the given method's signature is available in this class, either directly or via inheritance.


extendedFindClass

public ClassInfo extendedFindClass(String className)

findClass

public ClassInfo findClass(String className)

findInnerClass

public ClassInfo findInnerClass(String className)

findField

public FieldInfo findField(String name)

sortByName

public static ClassInfo[] sortByName(ClassInfo[] classes)

equals

public boolean equals(ClassInfo that)

setNonWrittenConstructors

public void setNonWrittenConstructors(MethodInfo[] nonWritten)

getNonWrittenConstructors

public MethodInfo[] getNonWrittenConstructors()

kind

public String kind()

scope

public String scope()

setHiddenMethods

public void setHiddenMethods(MethodInfo[] mInfo)

getHiddenMethods

public MethodInfo[] getHiddenMethods()

toString

public String toString()
Overrides:
toString in class Object

setReasonIncluded

public void setReasonIncluded(String reason)

getReasonIncluded

public String getReasonIncluded()

addInterface

public void addInterface(ClassInfo iface)

addConstructor

public void addConstructor(ConstructorInfo cInfo)

addField

public void addField(FieldInfo fInfo)

setSuperClass

public void setSuperClass(ClassInfo superclass)

allConstructorsMap

public Map<String,ConstructorInfo> allConstructorsMap()

allFields

public Map<String,FieldInfo> allFields()

allMethods

public Map<String,MethodInfo> allMethods()
Returns all methods defined directly in this class. For a list of all methods defined by this class and inherited from its supertypes, see methods().


hierarchy

public Iterable<ClassInfo> hierarchy()
Returns the class hierarchy for this class, starting with this class.


superclassName

public String superclassName()

setAnnotations

public void setAnnotations(AnnotationInstanceInfo[] annotations)

isConsistent

public boolean isConsistent(ClassInfo cl)

overriddenMethod

public static MethodInfo overriddenMethod(MethodInfo candidate,
                                          ClassInfo newClassObj)

interfaceMethod

public static MethodInfo interfaceMethod(MethodInfo candidate,
                                         ClassInfo newClassObj)

hasConstructor

public boolean hasConstructor(MethodInfo constructor)

setTypeInfo

public void setTypeInfo(TypeInfo typeInfo)

getSource

public String getSource()
                 throws IOException
Throws:
IOException


Copyright © 2010-2013 Google. All Rights Reserved.