public interface SourceDocComment extends SourceDocHasDescription
SourceDocComment
represents a documentation comment ("doc comment") associated with a class, interface, constructor, method, or field. Doc comments are also known informally as "Javadoc comments" (but this term violates its trademark usage). A doc comment has a main description, which is the text preceding the first block tag, and zero or more block tags. Both the main description and the descriptions contained by most block tags may contain inline tags.
The children of a doc comment are the following:
SourceDocDescription
for the main description, if any;SourceDocBlockTag
.CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, EMPTY_ARRAY, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT
Modifier and Type | Method and Description |
---|---|
SourceDocBlockTag |
findExceptionTag(java.lang.String exceptionName)
Finds the first
@exception or @throws tag in this doc comment with a specified fully-qualified name. |
java.util.Collection<SourceDocBlockTag> |
findExceptionTags()
Finds the
@exception or @throws tags in this doc comment. |
SourceDocBlockTag |
findParameterTag(java.lang.String parameterName)
Finds the first
@param tag in this doc comment with a specified name. |
java.util.Collection<SourceDocTag> |
findReferenceTags()
Finds the
@link , @linkplain , @see , and three-element @value tags in this doc comment. |
java.util.Collection<SourceDocTag> |
findReferenceTags(java.lang.String referenceText)
Finds the
@link , @linkplain , @see , and three-element @value tags in this doc comment with a specified normalized reference text . |
java.util.Collection<SourceDocTag> |
findTags(java.lang.String name)
Finds the tags in this doc comment with a specified name, or an empty list if none.
|
java.util.List<SourceDocBlockTag> |
getBlockTags()
Gets the block tags from this doc comment.
|
SourceDocDescription |
getDescription()
Gets the main description, the text before the first block tag, from this doc comment.
|
setDescription
getDocText, getInlineTags, getOwningDocComment, getOwningMember, getReferences, isBlank
addSelf, addSelf, addSelfAfter, addSelfBefore, adjustTextIndentation, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getJdkVersion, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, getTokens, hasErrors, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf
SourceDocDescription getDescription()
getDescription
in interface SourceDocHasDescription
java.util.List<SourceDocBlockTag> getBlockTags()
SourceDocBlockTag
s, one for each block tag in this doc comment, in document order.java.util.Collection<SourceDocTag> findTags(java.lang.String name)
name
- the name of a tag to find. The tag name must include the leading "@" character.SourceDocTag
s containing the tags in this doc comment with the specified name.java.util.Collection<SourceDocBlockTag> findExceptionTags()
@exception
or @throws
tags in this doc comment.SourceDocBlockTag
s containing the @exception
or @throws
tags in this doc comment.SourceDocBlockTag findExceptionTag(java.lang.String exceptionName)
@exception
or @throws
tag in this doc comment with a specified fully-qualified name.@exception
or @throws
tag in this doc comment with a fully-qualified name of exceptionName
, or null if none.SourceDocBlockTag findParameterTag(java.lang.String parameterName)
@param
tag in this doc comment with a specified name.@param
tag in this doc comment with a name of parameterName
, or null if none.java.util.Collection<SourceDocTag> findReferenceTags()
@link
, @linkplain
, @see
, and three-element @value
tags in this doc comment.SourceDocTag
s containing the @link, @linkplain, @see, and three-element @value tags in this doc comment.java.util.Collection<SourceDocTag> findReferenceTags(java.lang.String referenceText)
@link
, @linkplain
, @see
, and three-element @value
tags in this doc comment with a specified normalized reference text
.referenceText
- The normalized reference text to match.SourceDocTag
s containing the @link
, @linkplain
, @see
, or three-element @value
tags in this doc comment with a normalized reference text equal to referenceText
.