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) boolean
Deprecated.private String
Deprecated.private String
Deprecated.private SerializedForm
Deprecated.private String
Deprecated.final com.sun.tools.javac.code.Symbol.ClassSymbol
Deprecated.final com.sun.tools.javac.code.Type.ClassType
Deprecated.Fields inherited from class gw.gosudoc.com.sun.tools.javadoc.main.ProgramElementDocImpl
lineMap, tree
Fields 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) void
addAllClasses
(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 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.Deprecated.Return included constructors in class.constructors
(boolean filter) Deprecated.Return constructors in class.Deprecated.Return the package that this class is contained in.boolean
Deprecated.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 String
getClassName
(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.ClassSymbol
Deprecated.Identify the containing classDeprecated.If this type is an array type, return the element type of the array.protected long
getFlags()
Deprecated.Returns the flags in terms of javac's flags(package private) static long
getFlags
(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Returns the flags of a ClassSymbol in terms of javac's flagsprivate boolean
hasParameterTypes
(com.sun.tools.javac.code.Symbol.MethodSymbol method, String[] argTypes) Deprecated.private boolean
hasTypeName
(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.boolean
Deprecated.Return true if this class is abstract(package private) static boolean
isAnnotationType
(com.sun.tools.javac.code.Symbol.ClassSymbol clazz) Deprecated.Is a ClassSymbol an annotation type?boolean
isClass()
Deprecated.Return true if this is a class, not an interface.boolean
isEnum()
Deprecated.Return true if this is an enumeration.boolean
isError()
Deprecated.Return true if this is an error classboolean
Deprecated.Return true if this is an exception classboolean
Deprecated.Return true if this class implementsjava.io.Externalizable
.(package private) 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?boolean
Deprecated.Return true if this class is included in the active set.boolean
Deprecated.Return true if this is an interface, but not an annotation type.boolean
Deprecated.Return true if this is a ordinary class, not an enumeration, exception, an error, or an interface.boolean
Deprecated.Return false, as this is not a primitive type.(package private) boolean
Deprecated.Determine if a class is a RuntimeException.boolean
Deprecated.Return true if this class implementsjava.io.Serializable
.boolean
Deprecated.Returns true if this class was synthesized by the compiler.boolean
Deprecated.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.int
Deprecated.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 ClassDoc
searchClass
(String className) Deprecated.private FieldDocImpl
searchField
(String fieldName, Set<ClassDocImpl> searched) Deprecated.private MethodDocImpl
searchMethod
(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.boolean
subclassOf
(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, setTreePath
Methods 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, tags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface gw.gosudoc.com.sun.javadoc.Doc
commentText, compareTo, firstSentenceTags, getRawCommentText, inlineTags, isAnnotationType, isAnnotationTypeElement, isConstructor, isEnumConstant, isField, isMethod, seeTags, setRawCommentText, tags, tags
Methods 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:Type
If this type is an array type, return the element type of the array. Otherwise, return null.- Specified by:
getElementType
in interfaceType
- Returns:
- a
Type
representing the element type or null.
-
getFlags
protected long getFlags()Deprecated.Returns the flags in terms of javac's flags- Specified by:
getFlags
in 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:
getContainingClass
in 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:
isOrdinaryClass
in interfaceDoc
- Overrides:
isOrdinaryClass
in 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:
isInterface
in interfaceDoc
- Overrides:
isInterface
in classDocImpl
- Returns:
- true if it represents a interface
-
isException
public boolean isException()Deprecated.Return true if this is an exception class- Specified by:
isException
in interfaceDoc
- Overrides:
isException
in 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:
isAbstract
in 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:
isIncluded
in interfaceDoc
- Specified by:
isIncluded
in 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:
containingPackage
in interfaceProgramElementDoc
- Overrides:
containingPackage
in 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:
qualifiedName
in interfaceProgramElementDoc
- Specified by:
qualifiedName
in 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:
qualifiedTypeName
in interfaceType
- Returns:
- qualified name of this type excluding any dimension information.
-
simpleTypeName
Deprecated.Return the simple name of this type.- Specified by:
simpleTypeName
in 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:
typeParameters
in 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:
typeParamTags
in 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:
modifiers
in interfaceProgramElementDoc
- Overrides:
modifiers
in classProgramElementDocImpl
- Returns:
- "public abstract".
-
modifierSpecifier
public int modifierSpecifier()Deprecated.Description copied from class:ProgramElementDocImpl
Get the modifier specifier integer.- Specified by:
modifierSpecifier
in interfaceProgramElementDoc
- Overrides:
modifierSpecifier
in classProgramElementDocImpl
- Returns:
- Get the modifier specifier integer.
- See Also:
-
superclass
Deprecated.Return the superclass of this class- Specified by:
superclass
in 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 aClassDoc
or aParameterizedType
.- Specified by:
superclassType
in 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:
subclassOf
in 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:
interfaces
in 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:
interfaceTypes
in interfaceClassDoc
- Returns:
- an array of interfaces, each represented by a
ClassDoc
or 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:
enumConstants
in 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:
constructors
in 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:
constructors
in 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:
innerClasses
in 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:
innerClasses
in 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:
importedClasses
in 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:
importedPackages
in 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:
asClassDoc
in interfaceType
- Returns:
- the
ClassDoc
of 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:
asAnnotationTypeDoc
in interfaceType
- Returns:
- an
AnnotationTypeDoc
if 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:
asParameterizedType
in interfaceType
- Returns:
- a
ParameterizedType
if 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:
asTypeVariable
in interfaceType
- Returns:
- a
TypeVariable
if 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:
asWildcardType
in interfaceType
- Returns:
- a
WildcardType
if 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:
asAnnotatedType
in interfaceType
- Returns:
- a
AnnotatedType
if 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:
isPrimitive
in 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.Externalizable
extendsjava.io.Serializable
, Externalizable objects are also Serializable.- Specified by:
isSerializable
in 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:
isExternalizable
in interfaceClassDoc
- Returns:
- true if this class implements or interface extends
java.io.Externalizable
.
-
serializationMethods
Deprecated.Return the serialization methods for this class.- Specified by:
serializationMethods
in interfaceClassDoc
- Returns:
- an array of
MethodDocImpl
that represents the serialization methods for this class.
-
serializableFields
Deprecated.Return the Serializable fields of class.Return either a list of default fields documented by
serial
tag
or return a singleFieldDoc
forserialPersistentField
member. There should be aserialField
tag for each Serializable field defined by anObjectStreamField
array component ofserialPersistentField
.- Specified by:
serializableFields
in interfaceClassDoc
- Returns:
- an array of
FieldDoc
for 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:
definesSerializableFields
in 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.
-