Class DocImpl
- All Implemented Interfaces:
Doc,Comparable<Object>
- Direct Known Subclasses:
PackageDocImpl,ProgramElementDocImpl,RootDocImpl
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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CollationKeyDeprecated.The cached sort key, to take care of Natural Language Text sorting.private CommentDeprecated.The complex comment object, lazily initialized.protected StringDeprecated.Raw documentation string.protected final DocEnvDeprecated.Doc environmentprivate Tag[]Deprecated.Cached first sentence.private Tag[]Deprecated.Cached inline tags.protected com.sun.source.util.TreePathDeprecated.Back pointer to the tree node for this doc item. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Commentcomment()Deprecated.For lazy initialization of comment.Deprecated.Return the text of the comment for this doc item.intDeprecated.Compares this Object with the specified Object for order.protected StringDeprecated.So subclasses have the option to do lazy initialization of "documentation" string.Tag[]Deprecated.Return the first sentence of the comment as an array of tags.(package private) CollationKeyDeprecated.Generate a key for sorting.private static StringgetCommentText(com.sun.source.util.TreePath p) Deprecated.Deprecated.Return the full unprocessed text of the comment.Tag[]Deprecated.Return comment as an array of tags.booleanDeprecated.Is this Doc item an annotation type? False until overridden.booleanDeprecated.Is this Doc item an annotation type element? False until overridden.booleanisClass()Deprecated.Is this Doc item a class (and not an interface or annotation type)? This includes ordinary classes, enums, errors and exceptions.booleanDeprecated.Is this Doc item a constructor? False until overridden.booleanisEnum()Deprecated.Is this Doc item an enum type? False until overridden.booleanDeprecated.Is this Doc item an enum constant? False until overridden.booleanisError()Deprecated.Is this Doc item a error class? False until overridden.booleanDeprecated.Is this Doc item a exception class? False until overridden.booleanisField()Deprecated.Is this Doc item a field? False until overridden.abstract booleanDeprecated.return true if this Doc is include in the active set.booleanDeprecated.Is this Doc item a interface (but not an annotation type)? False until overridden.booleanisMethod()Deprecated.Is this Doc item a method (but not a constructor or annotation type element)? False until overridden.booleanDeprecated.Is this Doc item an ordinary class (i.e.(package private) CollationKeykey()Deprecated.return a key for sorting.abstract Stringname()Deprecated.Returns the name of this Doc item.position()Deprecated.Return the source position of the entity, or null if no position is available.abstract StringDeprecated.Returns the qualified name of this Doc item.(package private) StringreadHTMLDocumentation(InputStream input, FileObject filename) Deprecated.Utility for subclasses which read HTML documentation files.SeeTag[]seeTags()Deprecated.Return the see also tags in this Doc item.voidsetRawCommentText(String rawDocumentation) Deprecated.Set the full unprocessed text of the comment.(package private) voidsetTreePath(com.sun.source.util.TreePath treePath) Deprecated.Set the full unprocessed text of the comment and tree path.Tag[]tags()Deprecated.Return all tags in this Doc item.Tag[]Deprecated.Return tags of the specified kind in this Doc item.toString()Deprecated.Returns a string representation of this Doc item.
-
Field Details
-
env
Deprecated.Doc environment -
treePath
protected com.sun.source.util.TreePath treePathDeprecated.Back pointer to the tree node for this doc item. May be null if there is no associated tree. -
comment
Deprecated.The complex comment object, lazily initialized. -
collationkey
Deprecated.The cached sort key, to take care of Natural Language Text sorting. -
documentation
Deprecated.Raw documentation string. -
firstSentence
Deprecated.Cached first sentence. -
inlineTags
Deprecated.Cached inline tags.
-
-
Constructor Details
-
DocImpl
DocImpl(DocEnv env, com.sun.source.util.TreePath treePath) Deprecated.Constructor.
-
-
Method Details
-
getCommentText
Deprecated. -
documentation
Deprecated.So subclasses have the option to do lazy initialization of "documentation" string. -
comment
Comment comment()Deprecated.For lazy initialization of comment. -
commentText
Deprecated.Return the text of the comment for this doc item. TagImpls have been removed.- Specified by:
commentTextin interfaceDoc- Returns:
- the text of the comment for this doc item.
-
tags
Deprecated.Return all tags in this Doc item. -
tags
Deprecated.Return tags of the specified kind in this Doc item. -
seeTags
Deprecated.Return the see also tags in this Doc item. -
inlineTags
Deprecated.Description copied from interface:DocReturn comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as aTagof kind "Text". Inline tags are represented as aSeeTagof kind "@see" and name "@link".- Specified by:
inlineTagsin interfaceDoc- Returns:
- an array of
Tags representing the comment
-
firstSentenceTags
Deprecated.Description copied from interface:DocReturn the first sentence of the comment as an array of tags. Includes inline tags (i.e. {@link reference} tags) but not block tags. Each section of plain text is represented as aTagof kind "Text". Inline tags are represented as aSeeTagof kind "@see" and name "@link".If the locale is English language, the first sentence is determined by the rules described in the Java Language Specification (first version): "This sentence ends at the first period that is followed by a blank, tab, or line terminator or at the first tagline.", in addition a line will be terminated by block HTML tags: <p> </p> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <pre> or </pre>. If the locale is not English, the sentence end will be determined by
BreakIterator.getSentenceInstance(Locale).- Specified by:
firstSentenceTagsin interfaceDoc- Returns:
- an array of
Tags representing the first sentence of the comment
-
readHTMLDocumentation
Deprecated.Utility for subclasses which read HTML documentation files.- Throws:
IOException
-
getRawCommentText
Deprecated.Return the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.- Specified by:
getRawCommentTextin interfaceDoc- Returns:
- the full unprocessed text of the comment.
-
setRawCommentText
Deprecated.Set the full unprocessed text of the comment. Tags are included as text. Used mainly for store and retrieve operations like internalization.- Specified by:
setRawCommentTextin interfaceDoc- Parameters:
rawDocumentation- A String containing the full unprocessed text of the comment.
-
setTreePath
void setTreePath(com.sun.source.util.TreePath treePath) Deprecated.Set the full unprocessed text of the comment and tree path. -
key
CollationKey key()Deprecated.return a key for sorting. -
generateKey
CollationKey generateKey()Deprecated.Generate a key for sorting.Default is name().
-
toString
Deprecated.Returns a string representation of this Doc item. -
name
Deprecated.Returns the name of this Doc item. -
qualifiedName
Deprecated.Returns the qualified name of this Doc item.- Returns:
- the name
-
compareTo
Deprecated.Compares this Object with the specified Object for order. Returns a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.Included so that Doc item are java.lang.Comparable.
- Specified by:
compareToin interfaceComparable<Object>- Specified by:
compareToin interfaceDoc- Parameters:
obj- theObjectto be compared.- Returns:
- a negative integer, zero, or a positive integer as this Object is less than, equal to, or greater than the given Object.
- Throws:
ClassCastException- the specified Object's type prevents it from being compared to this Object.
-
isField
public boolean isField()Deprecated.Is this Doc item a field? False until overridden. -
isEnumConstant
public boolean isEnumConstant()Deprecated.Is this Doc item an enum constant? False until overridden.- Specified by:
isEnumConstantin interfaceDoc- Returns:
- true if it represents an enum constant
-
isConstructor
public boolean isConstructor()Deprecated.Is this Doc item a constructor? False until overridden.- Specified by:
isConstructorin interfaceDoc- Returns:
- true if it represents a constructor
-
isMethod
public boolean isMethod()Deprecated.Is this Doc item a method (but not a constructor or annotation type element)? False until overridden. -
isAnnotationTypeElement
public boolean isAnnotationTypeElement()Deprecated.Is this Doc item an annotation type element? False until overridden.- Specified by:
isAnnotationTypeElementin interfaceDoc- Returns:
- true if it represents an annotation type element
-
isInterface
public boolean isInterface()Deprecated.Is this Doc item a interface (but not an annotation type)? False until overridden.- Specified by:
isInterfacein interfaceDoc- Returns:
- true if it represents a interface
-
isException
public boolean isException()Deprecated.Is this Doc item a exception class? False until overridden.- Specified by:
isExceptionin interfaceDoc- Returns:
- true if it represents a exception
-
isError
public boolean isError()Deprecated.Is this Doc item a error class? False until overridden. -
isEnum
public boolean isEnum()Deprecated.Is this Doc item an enum type? False until overridden. -
isAnnotationType
public boolean isAnnotationType()Deprecated.Is this Doc item an annotation type? False until overridden.- Specified by:
isAnnotationTypein interfaceDoc- Returns:
- true if it represents an annotation type
-
isOrdinaryClass
public boolean isOrdinaryClass()Deprecated.Is this Doc item an ordinary class (i.e. not an interface, annotation type, enumeration, exception, or error)? False until overridden.- Specified by:
isOrdinaryClassin interfaceDoc- Returns:
- true if it represents an ordinary class
-
isClass
public boolean isClass()Deprecated.Is this Doc item a class (and not an interface or annotation type)? This includes ordinary classes, enums, errors and exceptions. False until overridden. -
isIncluded
public abstract boolean isIncluded()Deprecated.return true if this Doc is include in the active set.- Specified by:
isIncludedin interfaceDoc- Returns:
- true if this Doc item is included in the result set.
-
position
Deprecated.Return the source position of the entity, or null if no position is available.
-