Class ClassDocImpl
java.lang.Object
gw.gosudoc.com.sun.tools.javadoc.main.DocImpl
gw.gosudoc.com.sun.tools.javadoc.main.ProgramElementDocImpl
gw.gosudoc.com.sun.tools.javadoc.main.ClassDocImpl
- All Implemented Interfaces:
ClassDoc,Doc,ProgramElementDoc,Type,Comparable<Object>
- Direct Known Subclasses:
AnnotationTypeDocImpl
Deprecated.
Represents a java class and provides access to information
about the class, the class' comment and tags, and the
members of the class. A ClassDocImpl only exists if it was
processed in this run of javadoc. References to classes
which may or may not have been processed in this run are
referred to using Type (which can be converted to ClassDocImpl,
if possible).
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.
- Since:
- 1.2
- See Also:
-
Type
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanDeprecated.private StringDeprecated.private StringDeprecated.private SerializedFormDeprecated.private StringDeprecated.final com.sun.tools.javac.code.Symbol.ClassSymbolDeprecated.final com.sun.tools.javac.code.Type.ClassTypeDeprecated.Fields inherited from class gw.gosudoc.com.sun.tools.javadoc.main.ProgramElementDocImpl
lineMap, treeFields inherited from class gw.gosudoc.com.sun.tools.javadoc.main.DocImpl
documentation, env, treePath -
Constructor Summary
ConstructorsConstructorDescriptionClassDocImpl(DocEnv env, com.sun.tools.javac.code.Symbol.ClassSymbol sym) Deprecated.ConstructorClassDocImpl(DocEnv env, com.sun.tools.javac.code.Symbol.ClassSymbol sym, com.sun.source.util.TreePath treePath) Deprecated.Constructor -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddAllClasses(com.sun.tools.javac.util.ListBuffer<ClassDocImpl> l, boolean filtered) Deprecated.Adds all inner classes of this class, and their inner classes recursively, to the list l.Deprecated.Returns null, as this is not an annotated type.Deprecated.Return null (unless overridden), as this is not an annotation type.Deprecated.Return this type as a class, which it already is.Deprecated.Return null, as this is not a class instantiation.Deprecated.Return null, as this is not a type variable.Deprecated.Return null, as this is not a wildcard type.(package private) static StringclassToString(DocEnv env, com.sun.tools.javac.code.Symbol.ClassSymbol c, boolean full) Deprecated.Return the class name with any type parameters as a string.Deprecated.Return included constructors in class.constructors(boolean filter) Deprecated.Return constructors in class.Deprecated.Return the package that this class is contained in.booleanDeprecated.Return true if Serializable fields are explicitly defined with the special class memberserialPersistentFields.Deprecated.Return the type's dimension information.FieldDoc[]Deprecated.Return the enum constants if this is an enum type.FieldDoc[]fields()Deprecated.Return included fields in class.FieldDoc[]fields(boolean filter) Deprecated.Return fields in class.private FieldDoc[]fields(boolean filter, boolean enumConstants) Deprecated.Return fields in class.Deprecated.Find a class within the context of this class.findConstructor(String constrName, String[] paramTypes) Deprecated.Find constructor in this class.Deprecated.Find a field in this class scope.findMethod(String methodName, String[] paramTypes) Deprecated.Find a method in this class scope.(package private) static StringgetClassName(com.sun.tools.javac.code.Symbol.ClassSymbol c, boolean full) Deprecated.Return the class name as a string.protected com.sun.tools.javac.code.Symbol.ClassSymbolDeprecated.Identify the containing classDeprecated.If this type is an array type, return the element type of the array.protected longgetFlags()Deprecated.Returns the flags in terms of javac's flags(package private) static longgetFlags(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Returns the flags of a ClassSymbol in terms of javac's flagsprivate booleanhasParameterTypes(com.sun.tools.javac.code.Symbol.MethodSymbol method, String[] argTypes) Deprecated.private booleanhasTypeName(com.sun.tools.javac.code.Type t, String name) Deprecated.ClassDoc[]Deprecated.Import declarations are implementation details that should not be exposed here.Deprecated.Import declarations are implementation details that should not be exposed here.ClassDoc[]Deprecated.Return included inner classes within this class.ClassDoc[]innerClasses(boolean filter) Deprecated.Return inner classes within this class.ClassDoc[]Deprecated.Return interfaces implemented by this class or interfaces extended by this interface.Type[]Deprecated.Return interfaces implemented by this class or interfaces extended by this interface.booleanDeprecated.Return true if this class is abstract(package private) static booleanisAnnotationType(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Is a ClassSymbol an annotation type?booleanisClass()Deprecated.Return true if this is a class, not an interface.booleanisEnum()Deprecated.Return true if this is an enumeration.booleanisError()Deprecated.Return true if this is an error classbooleanDeprecated.Return true if this is an exception classbooleanDeprecated.Return true if this class implementsjava.io.Externalizable.(package private) static booleanisGeneric(com.sun.tools.javac.code.Symbol.ClassSymbol c) Deprecated.Is this class (or any enclosing class) generic? That is, does it have type parameters?booleanDeprecated.Return true if this class is included in the active set.booleanDeprecated.Return true if this is an interface, but not an annotation type.booleanDeprecated.Return true if this is a ordinary class, not an enumeration, exception, an error, or an interface.booleanDeprecated.Return false, as this is not a primitive type.(package private) booleanDeprecated.Determine if a class is a RuntimeException.booleanDeprecated.Return true if this class implementsjava.io.Serializable.booleanDeprecated.Returns true if this class was synthesized by the compiler.booleanDeprecated.Return true if this is a throwable classmethods()Deprecated.Return included methods in class.methods(boolean filter) Deprecated.Return methods in class.Deprecated.Return the modifier string for this class.intDeprecated.Get the modifier specifier integer.name()Deprecated.Return the class name without package qualifier - but with enclosing class qualifier - as a String.position()Deprecated.Return the source position of the entity, or null if no position is available.Deprecated.Return the qualified class name as a String.Deprecated.Return qualified name of type excluding any dimension information.private ClassDocsearchClass(String className) Deprecated.private FieldDocImplsearchField(String fieldName, Set<ClassDocImpl> searched) Deprecated.private MethodDocImplsearchMethod(String methodName, String[] paramTypes, Set<ClassDocImpl> searched) Deprecated.FieldDoc[]Deprecated.Return the Serializable fields of class.Deprecated.Return the serialization methods for this class.Deprecated.Return the simple name of this type.booleansubclassOf(ClassDoc cd) Deprecated.Test whether this class is a subclass of the specified class.Deprecated.Return the superclass of this classDeprecated.Return the superclass of this class.toString()Deprecated.Return the qualified name and any type parameters.typeName()Deprecated.Return unqualified name of type excluding any dimension information.Deprecated.Return the formal type parameters of this class or interface.ParamTag[]Deprecated.Return the type parameter tags of this class or interface.Methods inherited from class gw.gosudoc.com.sun.tools.javadoc.main.ProgramElementDocImpl
annotations, containingClass, generateKey, getModifiers, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, setTreePathMethods inherited from class gw.gosudoc.com.sun.tools.javadoc.main.DocImpl
comment, commentText, compareTo, documentation, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isConstructor, isEnumConstant, isField, isMethod, key, readHTMLDocumentation, seeTags, setRawCommentText, tags, tagsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.gosudoc.com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isConstructor, isEnumConstant, isField, isMethod, seeTags, setRawCommentText, tags, tagsMethods inherited from interface gw.gosudoc.com.sun.javadoc.ProgramElementDoc
annotations, containingClass, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Field Details
-
type
public final com.sun.tools.javac.code.Type.ClassType typeDeprecated. -
tsym
public final com.sun.tools.javac.code.Symbol.ClassSymbol tsymDeprecated. -
isIncluded
boolean isIncludedDeprecated. -
serializedForm
Deprecated. -
name
Deprecated. -
qualifiedName
Deprecated. -
simpleTypeName
Deprecated.
-
-
Constructor Details
-
ClassDocImpl
Deprecated.Constructor -
ClassDocImpl
public ClassDocImpl(DocEnv env, com.sun.tools.javac.code.Symbol.ClassSymbol sym, com.sun.source.util.TreePath treePath) Deprecated.Constructor
-
-
Method Details
-
getElementType
Deprecated.Description copied from interface:TypeIf this type is an array type, return the element type of the array. Otherwise, return null.- Specified by:
getElementTypein interfaceType- Returns:
- a
Typerepresenting the element type or null.
-
getFlags
protected long getFlags()Deprecated.Returns the flags in terms of javac's flags- Specified by:
getFlagsin classProgramElementDocImpl
-
getFlags
static long getFlags(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Returns the flags of a ClassSymbol in terms of javac's flags -
isAnnotationType
static boolean isAnnotationType(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Is a ClassSymbol an annotation type? -
getContainingClass
protected com.sun.tools.javac.code.Symbol.ClassSymbol getContainingClass()Deprecated.Identify the containing class- Specified by:
getContainingClassin classProgramElementDocImpl
-
isClass
public boolean isClass()Deprecated.Return true if this is a class, not an interface. -
isOrdinaryClass
public boolean isOrdinaryClass()Deprecated.Return true if this is a ordinary class, not an enumeration, exception, an error, or an interface.- Specified by:
isOrdinaryClassin interfaceDoc- Overrides:
isOrdinaryClassin classDocImpl- Returns:
- true if it represents an ordinary class
-
isEnum
public boolean isEnum()Deprecated.Return true if this is an enumeration. (For legacy doclets, return false.) -
isInterface
public boolean isInterface()Deprecated.Return true if this is an interface, but not an annotation type. Overridden by AnnotationTypeDocImpl.- Specified by:
isInterfacein interfaceDoc- Overrides:
isInterfacein classDocImpl- Returns:
- true if it represents a interface
-
isException
public boolean isException()Deprecated.Return true if this is an exception class- Specified by:
isExceptionin interfaceDoc- Overrides:
isExceptionin classDocImpl- Returns:
- true if it represents a exception
-
isError
public boolean isError()Deprecated.Return true if this is an error class -
isThrowable
public boolean isThrowable()Deprecated.Return true if this is a throwable class -
isAbstract
public boolean isAbstract()Deprecated.Return true if this class is abstract- Specified by:
isAbstractin interfaceClassDoc- Returns:
- true if this class is abstract. Return true for all interfaces.
-
isSynthetic
public boolean isSynthetic()Deprecated.Returns true if this class was synthesized by the compiler. -
isIncluded
public boolean isIncluded()Deprecated.Return true if this class is included in the active set. A ClassDoc is included iff either it is specified on the commandline, or if it's containing package is specified on the command line, or if it is a member class of an included class.- Specified by:
isIncludedin interfaceDoc- Specified by:
isIncludedin classDocImpl- Returns:
- true if this Doc item is included in the result set.
-
containingPackage
Deprecated.Return the package that this class is contained in.- Specified by:
containingPackagein interfaceProgramElementDoc- Overrides:
containingPackagein classProgramElementDocImpl- Returns:
- a PackageDoc for this element containing package. If in the unnamed package, this PackageDoc will have the name "".
-
name
Deprecated.Return the class name without package qualifier - but with enclosing class qualifier - as a String.Examples: for java.util.Hashtable return Hashtable for java.util.Map.Entry return Map.Entry
-
qualifiedName
Deprecated.Return the qualified class name as a String.Example: for java.util.Hashtable return java.util.Hashtable if no qualifier, just return flat name
- Specified by:
qualifiedNamein interfaceProgramElementDoc- Specified by:
qualifiedNamein classDocImpl- Returns:
- the name
-
typeName
Deprecated.Return unqualified name of type excluding any dimension information.For example, a two dimensional array of String returns 'String'.
-
qualifiedTypeName
Deprecated.Return qualified name of type excluding any dimension information.For example, a two dimensional array of String returns 'java.lang.String'.
- Specified by:
qualifiedTypeNamein interfaceType- Returns:
- qualified name of this type excluding any dimension information.
-
simpleTypeName
Deprecated.Return the simple name of this type.- Specified by:
simpleTypeNamein interfaceType- Returns:
- the simple name of this type excluding any dimension information.
-
toString
Deprecated.Return the qualified name and any type parameters. Each parameter is a type variable with optional bounds. -
getClassName
Deprecated.Return the class name as a string. If "full" is true the name is qualified, otherwise it is qualified by its enclosing class(es) only. -
classToString
static String classToString(DocEnv env, com.sun.tools.javac.code.Symbol.ClassSymbol c, boolean full) Deprecated.Return the class name with any type parameters as a string. Each parameter is a type variable with optional bounds. If "full" is true all names are qualified, otherwise they are qualified by their enclosing class(es) only. -
isGeneric
static boolean isGeneric(com.sun.tools.javac.code.Symbol.ClassSymbol c) Deprecated.Is this class (or any enclosing class) generic? That is, does it have type parameters? -
typeParameters
Deprecated.Return the formal type parameters of this class or interface. Return an empty array if there are none.- Specified by:
typeParametersin interfaceClassDoc- Returns:
- the formal type parameters of this class or interface.
-
typeParamTags
Deprecated.Return the type parameter tags of this class or interface.- Specified by:
typeParamTagsin interfaceClassDoc- Returns:
- the type parameter tags of this class or interface.
-
modifiers
Deprecated.Return the modifier string for this class. If it's an interface exclude 'abstract' keyword from the modifier string- Specified by:
modifiersin interfaceProgramElementDoc- Overrides:
modifiersin classProgramElementDocImpl- Returns:
- "public abstract".
-
modifierSpecifier
public int modifierSpecifier()Deprecated.Description copied from class:ProgramElementDocImplGet the modifier specifier integer.- Specified by:
modifierSpecifierin interfaceProgramElementDoc- Overrides:
modifierSpecifierin classProgramElementDocImpl- Returns:
- Get the modifier specifier integer.
- See Also:
-
superclass
Deprecated.Return the superclass of this class- Specified by:
superclassin interfaceClassDoc- Returns:
- the ClassDocImpl for the superclass of this class, null if there is no superclass.
- See Also:
-
superclassType
Deprecated.Return the superclass of this class. Return null if this is an interface. A superclass is represented by either aClassDocor aParameterizedType.- Specified by:
superclassTypein interfaceClassDoc- Returns:
- the superclass of this class, or null if there is no superclass.
-
subclassOf
Deprecated.Test whether this class is a subclass of the specified class.- Specified by:
subclassOfin interfaceClassDoc- Parameters:
cd- the candidate superclass.- Returns:
- true if cd is a superclass of this class.
-
interfaces
Deprecated.Return interfaces implemented by this class or interfaces extended by this interface.- Specified by:
interfacesin interfaceClassDoc- Returns:
- An array of ClassDocImpl representing the interfaces. Return an empty array if there are no interfaces.
- See Also:
-
interfaceTypes
Deprecated.Return interfaces implemented by this class or interfaces extended by this interface. Includes only directly-declared interfaces, not inherited interfaces. Return an empty array if there are no interfaces.- Specified by:
interfaceTypesin interfaceClassDoc- Returns:
- an array of interfaces, each represented by a
ClassDocor aParametrizedType.
-
fields
Deprecated.Return fields in class. -
fields
Deprecated.Return included fields in class. -
enumConstants
Deprecated.Return the enum constants if this is an enum type.- Specified by:
enumConstantsin interfaceClassDoc- Returns:
- the enum constants if this is an enum type.
-
fields
Deprecated.Return fields in class.- Parameters:
filter- if true, return only the included fieldsenumConstants- if true, return the enum constants instead
-
methods
Deprecated.Return methods in class. This method is overridden by AnnotationTypeDocImpl. -
methods
Deprecated.Return included methods in class. -
constructors
Deprecated.Return constructors in class.- Specified by:
constructorsin interfaceClassDoc- Parameters:
filter- include only the included constructors if filter==true- Returns:
- an array of ConstructorDocImpl for representing the visible constructors in this class.
-
constructors
Deprecated.Return included constructors in class.- Specified by:
constructorsin interfaceClassDoc- Returns:
- an array of ConstructorDocImpl for representing the visible constructors in this class.
-
addAllClasses
Deprecated.Adds all inner classes of this class, and their inner classes recursively, to the list l. -
innerClasses
Deprecated.Return inner classes within this class.- Specified by:
innerClassesin interfaceClassDoc- Parameters:
filter- include only the included inner classes if filter==true.- Returns:
- an array of ClassDocImpl for representing the visible classes defined in this class. Anonymous and local classes are not included.
-
innerClasses
Deprecated.Return included inner classes within this class.- Specified by:
innerClassesin interfaceClassDoc- Returns:
- an array of ClassDocImpl for representing the visible classes defined in this class. Anonymous and local classes are not included.
-
findClass
Deprecated.Find a class within the context of this class. Search order: qualified name, in this class (inner), in this package, in the class imports, in the package imports. Return the ClassDocImpl if found, null if not found. -
searchClass
Deprecated. -
hasParameterTypes
private boolean hasParameterTypes(com.sun.tools.javac.code.Symbol.MethodSymbol method, String[] argTypes) Deprecated. -
hasTypeName
Deprecated. -
findMethod
Deprecated.Find a method in this class scope. Search order: this class, interfaces, superclasses, outerclasses. Note that this is not necessarily what the compiler would do!- Parameters:
methodName- the unqualified name to search for.paramTypes- the array of Strings for method parameter types.- Returns:
- the first MethodDocImpl which matches, null if not found.
-
searchMethod
private MethodDocImpl searchMethod(String methodName, String[] paramTypes, Set<ClassDocImpl> searched) Deprecated. -
findConstructor
Deprecated.Find constructor in this class.- Parameters:
constrName- the unqualified name to search for.paramTypes- the array of Strings for constructor parameters.- Returns:
- the first ConstructorDocImpl which matches, null if not found.
-
findField
Deprecated.Find a field in this class scope. Search order: this class, outerclasses, interfaces, superclasses. IMP: If see tag is defined in an inner class, which extends a super class and if outerclass and the super class have a visible field in common then Java compiler cribs about the ambiguity, but the following code will search in the above given search order.- Parameters:
fieldName- the unqualified name to search for.- Returns:
- the first FieldDocImpl which matches, null if not found.
-
searchField
Deprecated. -
importedClasses
Deprecated.Import declarations are implementation details that should not be exposed here. In addition, not all imported classes are imported through single-type-import declarations.Get the list of classes declared as imported. These are called "single-type-import declarations" in the JLS. This method is deprecated in the ClassDoc interface.- Specified by:
importedClassesin interfaceClassDoc- Returns:
- an array of ClassDocImpl representing the imported classes.
-
importedPackages
Deprecated.Import declarations are implementation details that should not be exposed here. In addition, this method's return type does not allow for all type-import-on-demand declarations to be returned.Get the list of packages declared as imported. These are called "type-import-on-demand declarations" in the JLS. This method is deprecated in the ClassDoc interface.- Specified by:
importedPackagesin interfaceClassDoc- Returns:
- an array of PackageDocImpl representing the imported packages. ###NOTE: the syntax supports importing all inner classes from a class as well.
-
dimension
Deprecated.Return the type's dimension information. Always return "", as this is not an array type. -
asClassDoc
Deprecated.Return this type as a class, which it already is.- Specified by:
asClassDocin interfaceType- Returns:
- the
ClassDocof this type, or null if it is a primitive type.
-
asAnnotationTypeDoc
Deprecated.Return null (unless overridden), as this is not an annotation type.- Specified by:
asAnnotationTypeDocin interfaceType- Returns:
- an
AnnotationTypeDocif the type is an annotation type, or null if it is not.
-
asParameterizedType
Deprecated.Return null, as this is not a class instantiation.- Specified by:
asParameterizedTypein interfaceType- Returns:
- a
ParameterizedTypeif the type is an invocation of a generic type, or null if it is not.
-
asTypeVariable
Deprecated.Return null, as this is not a type variable.- Specified by:
asTypeVariablein interfaceType- Returns:
- a
TypeVariableif the type is a type variable, or null if it is not.
-
asWildcardType
Deprecated.Return null, as this is not a wildcard type.- Specified by:
asWildcardTypein interfaceType- Returns:
- a
WildcardTypeif the type is a wildcard type, or null if it is not.
-
asAnnotatedType
Deprecated.Returns null, as this is not an annotated type.- Specified by:
asAnnotatedTypein interfaceType- Returns:
- a
AnnotatedTypeif the type if an annotated type, or null if it is not
-
isPrimitive
public boolean isPrimitive()Deprecated.Return false, as this is not a primitive type.- Specified by:
isPrimitivein interfaceType- Returns:
- true if this type represents a primitive type.
-
isSerializable
public boolean isSerializable()Deprecated.Return true if this class implementsjava.io.Serializable. Sincejava.io.Externalizableextendsjava.io.Serializable, Externalizable objects are also Serializable.- Specified by:
isSerializablein interfaceClassDoc- Returns:
- true if this class implements or interface extends
java.io.Serializable.
-
isExternalizable
public boolean isExternalizable()Deprecated.Return true if this class implementsjava.io.Externalizable.- Specified by:
isExternalizablein interfaceClassDoc- Returns:
- true if this class implements or interface extends
java.io.Externalizable.
-
serializationMethods
Deprecated.Return the serialization methods for this class.- Specified by:
serializationMethodsin interfaceClassDoc- Returns:
- an array of
MethodDocImplthat represents the serialization methods for this class.
-
serializableFields
Deprecated.Return the Serializable fields of class.Return either a list of default fields documented by
serialtag
or return a singleFieldDocforserialPersistentFieldmember. There should be aserialFieldtag for each Serializable field defined by anObjectStreamFieldarray component ofserialPersistentField.- Specified by:
serializableFieldsin interfaceClassDoc- Returns:
- an array of
FieldDocfor the Serializable fields of this class. - See Also:
-
definesSerializableFields
public boolean definesSerializableFields()Deprecated.Return true if Serializable fields are explicitly defined with the special class memberserialPersistentFields.- Specified by:
definesSerializableFieldsin interfaceClassDoc- Returns:
- true if Serializable fields are explicitly defined with
the special class member
serialPersistentFields. - See Also:
-
isRuntimeException
boolean isRuntimeException()Deprecated.Determine if a class is a RuntimeException.Used only by ThrowsTagImpl.
-
position
Deprecated.Return the source position of the entity, or null if no position is available.
-