Top Description Fields Constructors Methods
jdk.javadoc.internal.doclets.formats.html.taglets

public Class ValueTaglet

extends BaseTaglet
Class Inheritance
Imports
java.util.EnumSet, .IllegalFormatException, .Optional, javax.lang.model.element.Element, .VariableElement, com.sun.source.doctree.DocTree, .TextTree, .ValueTree, jdk.javadoc.doclet.Taglet, jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration, .HtmlLinkInfo, .Content, jdk.javadoc.internal.doclets.formats.html.markup.Text, jdk.javadoc.internal.doclets.toolkit.BaseConfiguration, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper

An inline taglet representing the value tag. This tag should only be used with constant fields that have a value. It is used to access the value of constant fields. This inline tag has an optional field name parameter. If the name is specified, the constant value is retrieved from the specified field. A link is also created to the specified field. If a name is not specified, the value is retrieved for the field that the inline tag appears on. The name is specified in the following format: [fully qualified class name]#[constant field name].

Field Summary

Inherited from jdk.javadoc.internal.doclets.formats.html.taglets.BaseTaglet:
configmessagesnameresourcestagKindtagletWriterutils

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Content
getInlineTagOutput(Element
the element for the enclosing doc comment
holder
,
DocTree
the tag
tag
,
TagletWriter
the taglet-writer used in this doclet
tagletWriter
)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.BaseTaglet.getInlineTagOutput.

Implements jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

Returns the content to be included in the generated output for an instance of an inline tag handled by this taglet.
private VariableElement

Returns:

the referenced field or null.
getVariableElement
(Element
the tag holder.
holder
,
BaseConfiguration
the configuration of the doclet.
config
,
DocTree
the value tag.
tag
)

Returns the referenced field or a null if the value tag is empty or the reference is invalid.

private Content

Returns:

the output
valueTagOutput
(VariableElement
the constant field that holds the value tag
field
,
String
the constant value to document
constantVal
,
boolean
true if we should link the constant text to the constant field itself
includeLink
)

Returns the output for a {@value} tag.

Inherited from jdk.javadoc.internal.doclets.formats.html.taglets.BaseTaglet:
getAllBlockTagOutputgetAllowedLocationsgetNamegetTagKindisInlineTag

Constructor Detail

ValueTagletback to summary
pack-priv ValueTaglet(HtmlConfiguration config)

Method Detail

getInlineTagOutputback to summary
public Content getInlineTagOutput(Element holder, DocTree tag, TagletWriter tagletWriter)

Overrides jdk.javadoc.internal.doclets.formats.html.taglets.BaseTaglet.getInlineTagOutput.

Implements jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

Doc from jdk.javadoc.internal.doclets.formats.html.taglets.BaseTaglet.getInlineTagOutput.

Returns the content to be included in the generated output for an instance of an inline tag handled by this taglet.

Parameters
holder:Element

Doc from jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

the element for the enclosing doc comment

tag:DocTree

Doc from jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

the tag

tagletWriter:TagletWriter

Doc from jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

the taglet-writer used in this doclet

Returns:Content

Doc from jdk.javadoc.internal.doclets.formats.html.taglets.Taglet.getInlineTagOutput.

the output for this tag

Annotations
@Override
getVariableElementback to summary
private VariableElement getVariableElement(Element holder, BaseConfiguration config, DocTree tag)

Returns the referenced field or a null if the value tag is empty or the reference is invalid.

Parameters
holder:Element

the tag holder.

config:BaseConfiguration

the configuration of the doclet.

tag:DocTree

the value tag.

Returns:VariableElement

the referenced field or null.

valueTagOutputback to summary
private Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink)

Returns the output for a {@value} tag.

Parameters
field:VariableElement

the constant field that holds the value tag

constantVal:String

the constant value to document

includeLink:boolean

true if we should link the constant text to the constant field itself

Returns:Content

the output