Klasse TagletWriter
- Bekannte direkte Unterklassen:
TagletWriterImpl
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected final boolean
True if we only want to write the first sentence. -
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected abstract Content
codeTagOutput
(Element element, LiteralTree tag) Returns the output for a {@code …} tag.abstract Content
commentTagsToOutput
(DocTree holderTree, List<? extends DocTree> trees) Converts inline tags and text to content, expanding the inline tags along the way.abstract Content
commentTagsToOutput
(Element element, DocTree holder, List<? extends DocTree> trees, boolean isFirstSentence) Converts inline tags and text to content, expanding the inline tags along the way.abstract Content
commentTagsToOutput
(Element element, List<? extends DocTree> trees) Converts inline tags and text to content, expanding the inline tags along the way.abstract BaseConfiguration
Returns an instance of the configuration used for this doclet.protected abstract Content
deprecatedTagOutput
(Element element) Returns the output for a @deprecated tag.getBlockTagOutput
(TagletManager tagletManager, Element element, List<Taglet> taglets) Returns the content generated from the block tags for a given element.protected abstract TypeElement
Returns the main type element of the current page or null for pages that don’t have one.protected abstract Content
Returns the output for a {@docRoot} tag.getInlineTagOutput
(Element holder, TagletManager tagletManager, DocTree inlineTag) Returns the content generated from an inline tag in the doc comment for a given element, or null if the tag is not supported or does not return any output.abstract Content
Returns an instance of an output object.protected abstract Content
Returns the header for the @param tags.protected abstract Content
Returns the header for the @throws tag.protected abstract Content
indexTagOutput
(Element element, IndexTree tag) Returns the output for a {@index…} tag.protected abstract Content
invalidTagOutput
(String summary, Optional<String> detail) Returns the output for an invalid tag.protected abstract Content
linkTagOutput
(Element element, LinkTree tag) Returns the output for a {@link …} or {@linkplain …} tag.protected abstract Content
literalTagOutput
(Element element, LiteralTree tag) Returns the output for a {@literal …} tag.protected abstract Content
paramTagOutput
(Element element, ParamTree paramTag, String paramName) Returns the output for a @param tag.protected abstract Content
returnTagOutput
(Element element, ReturnTree returnTag, boolean inline) Returns the output for a @return tag.protected abstract Content
seeTagOutput
(Element element, List<? extends SeeTree> seeTags) Returns the output for @see tags.protected abstract Content
simpleBlockTagOutput
(Element element, List<? extends DocTree> simpleTags, String header) Returns the output for a series of simple tags.protected abstract Content
snippetTagOutput
(Element element, SnippetTree snippetTag, StyledText text, String id, String lang) Returns the output for a {@snippet …} tag.protected abstract Content
specTagOutput
(Element element, List<? extends SpecTree> specTags) Returns the output for one or more @spec tags.protected abstract Content
systemPropertyTagOutput
(Element element, SystemPropertyTree systemPropertyTag) Returns the output for a {@systemProperty…} tag.protected abstract Content
throwsTagOutput
(TypeMirror throwsType, Optional<Content> content) Returns the output for a default @throws tag.protected abstract Content
valueTagOutput
(VariableElement field, String constantVal, boolean includeLink) Returns the output for a {@value} tag.
-
Felddetails
-
isFirstSentence
True if we only want to write the first sentence.
-
-
Konstruktordetails
-
TagletWriter
-
-
Methodendetails
-
getOutputInstance
Returns an instance of an output object.- Gibt zurück:
- an instance of an output object
-
codeTagOutput
Returns the output for a {@code …} tag.- Parameter:
element
- The element that owns the doc commenttag
- the tag- Gibt zurück:
- the output
-
indexTagOutput
Returns the output for a {@index…} tag.- Parameter:
element
- The element that owns the doc commenttag
- the tag- Gibt zurück:
- the output
-
getDocRootOutput
Returns the output for a {@docRoot} tag.- Gibt zurück:
- the output
-
deprecatedTagOutput
Returns the output for a @deprecated tag.- Parameter:
element
- The element that owns the doc comment- Gibt zurück:
- the output
-
linkTagOutput
Returns the output for a {@link …} or {@linkplain …} tag.- Parameter:
element
- The element that owns the doc commenttag
- the tag- Gibt zurück:
- the output
-
literalTagOutput
Returns the output for a {@literal …} tag.- Parameter:
element
- The element that owns the doc commenttag
- the tag- Gibt zurück:
- the output
-
getParamHeader
Returns the header for the @param tags.- Parameter:
kind
- the kind of header that is required- Gibt zurück:
- the header
-
paramTagOutput
Returns the output for a @param tag.Note we cannot rely on the name in the tag, because we might be inheriting the tag.
- Parameter:
element
- The element that owns the doc commentparamTag
- the parameter to documentparamName
- the name of the parameter- Gibt zurück:
- the output
-
returnTagOutput
Returns the output for a @return tag.- Parameter:
element
- the element that owns the doc commentreturnTag
- the return tag to documentinline
- whether this should be written as an inline instance or block instance- Gibt zurück:
- the output
-
seeTagOutput
Returns the output for @see tags.- Parameter:
element
- The element that owns the doc commentseeTags
- the list of tags- Gibt zurück:
- the output
-
simpleBlockTagOutput
protected abstract Content simpleBlockTagOutput(Element element, List<? extends DocTree> simpleTags, String header) Returns the output for a series of simple tags.- Parameter:
element
- The element that owns the doc commentsimpleTags
- the list of simple tagsheader
- the header for the series of tags- Gibt zurück:
- the output
-
snippetTagOutput
protected abstract Content snippetTagOutput(Element element, SnippetTree snippetTag, StyledText text, String id, String lang) Returns the output for a {@snippet …} tag.- Parameter:
element
- The element that owns the doc commentsnippetTag
- the snippet tagid
- the value of the id attribute, or null if not definedlang
- the value of the lang attribute, or null if not defined- Gibt zurück:
- the output
-
specTagOutput
Returns the output for one or more @spec tags.- Parameter:
element
- the element that owns the doc commentspecTags
- the array of @spec tags.- Gibt zurück:
- the output
-
systemPropertyTagOutput
protected abstract Content systemPropertyTagOutput(Element element, SystemPropertyTree systemPropertyTag) Returns the output for a {@systemProperty…} tag.- Parameter:
element
- the element that owns the doc commentsystemPropertyTag
- the system property tag- Gibt zurück:
- the output
-
getThrowsHeader
Returns the header for the @throws tag.- Gibt zurück:
- the header for the throws tag
-
throwsTagOutput
Returns the output for a default @throws tag.- Parameter:
throwsType
- the type that is throwncontent
- the optional content to add as a description- Gibt zurück:
- the output
-
valueTagOutput
protected abstract Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink) Returns the output for a {@value} tag.- Parameter:
field
- the constant field that holds the value tagconstantVal
- the constant value to documentincludeLink
- true if we should link the constant text to the constant field itself- Gibt zurück:
- the output
-
invalidTagOutput
Returns the output for an invalid tag.The returned content uses special styling to highlight the problem. Depending on the presence of the detail string the method returns a plain text span or an expandable component.
- Parameter:
summary
- the single-line summary messagedetail
- the optional detail message which may contain preformatted text- Gibt zurück:
- the output
-
getCurrentPageElement
Returns the main type element of the current page or null for pages that don’t have one.- Gibt zurück:
- the type element of the current page or null.
-
getBlockTagOutput
public Content getBlockTagOutput(TagletManager tagletManager, Element element, List<Taglet> taglets) Returns the content generated from the block tags for a given element.The content is generated according to the order of the list of taglets. The result is a possibly-empty list of the output generated by each of the given taglets for all of the tags they individually support.
- Parameter:
tagletManager
- the manager that manages the tagletselement
- the element that we are to write tags fortaglets
- the taglets for the tags to write- Gibt zurück:
- the content
-
getInlineTagOutput
Returns the content generated from an inline tag in the doc comment for a given element, or null if the tag is not supported or does not return any output.- Parameter:
holder
- the element associated with the doc commenttagletManager
- the taglet manager for the current docletinlineTag
- the inline tag to be documented- Gibt zurück:
- the content, or null
-
commentTagsToOutput
Converts inline tags and text to content, expanding the inline tags along the way.Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to block tags.
- Parameter:
holderTree
- the tree that holds the documentationtrees
- list of DocTree nodes containing text and inline tags (often alternating) present in the text of interest for this doc- Gibt zurück:
- the generated content
-
commentTagsToOutput
Converts inline tags and text to content, expanding the inline tags along the way.Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to block tags.
- Parameter:
element
- The element that owns the documentationtrees
- list of DocTree nodes containing text and inline tags (often alternating) present in the text of interest for this doc- Gibt zurück:
- the generated content
-
commentTagsToOutput
public abstract Content commentTagsToOutput(Element element, DocTree holder, List<? extends DocTree> trees, boolean isFirstSentence) Converts inline tags and text to content, expanding the inline tags along the way.Called wherever text can contain an inline tag, such as in comments or in free-form text arguments to non-inline tags.
- Parameter:
element
- the element where comment residesholder
- the tag that holds the documentationtrees
- array of text tags and inline tags (often alternating) present in the text of interest for this docisFirstSentence
- true if this is the first sentence- Gibt zurück:
- the generated content
-
configuration
Returns an instance of the configuration used for this doclet.- Gibt zurück:
- an instance of the configuration used for this doclet
-