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

public Class LinkTaglet

extends BaseTaglet
Class Inheritance
Imports
java.util.EnumSet, .Objects, .Optional, java.util.function.BiConsumer, javax.lang.model.element.Element, .ElementKind, .ExecutableElement, .ModuleElement, .PackageElement, .TypeElement, javax.lang.model.type.TypeMirror, com.sun.source.doctree.DocTree, .LinkTree, com.sun.source.util.DocTreePath, jdk.javadoc.doclet.Taglet, jdk.javadoc.internal.doclets.formats.html.ClassWriter, .HtmlConfiguration, .HtmlLinkInfo, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper, .DocLink, .VisibleMemberTable, jdk.javadoc.internal.html.Content, .HtmlId, .HtmlTree, .Text

A taglet that represents the {@link ...} and ... tags, with support for links to program elements in @see and {@snippet ...} tags.

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 element, DocTree tag, TagletWriter 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.

pack-priv Content

Returns:

the output containing the generated link, or content indicating an error
linkSeeReferenceOutput
(Element
the element that has the documentation comment containing the information
holder
,
DocTree
the tree node containing the information, or null if not available
refTree
,
String
the normalized signature of the target of the reference
refSignature
,
Element
the target of the reference
ref
,
boolean
true if the link should be presented in "plain" font, or false for "code" font
isPlain
,
Content
the label for the link, or an empty item to use a default label derived from the signature
label
,
BiConsumer<String, Object[]>
a function to report warnings about issues found in the reference
reportWarning
,
TagletWriter
the writer providing the context for this call
tagletWriter
)

Worker method to generate a link from the information in different kinds of tags, such as {@link ...} tags, @see ...

private Content
plainOrCode(boolean plain, Content body)

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

Constructor Detail

LinkTagletback to summary
pack-priv LinkTaglet(HtmlConfiguration config, DocTree.Kind tagKind)

Method Detail

getInlineTagOutputback to summary
public Content getInlineTagOutput(Element element, 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.

Annotations
@Override
linkSeeReferenceOutputback to summary
pack-priv Content linkSeeReferenceOutput(Element holder, DocTree refTree, String refSignature, Element ref, boolean isPlain, Content label, BiConsumer<String, Object[]> reportWarning, TagletWriter tagletWriter)

Worker method to generate a link from the information in different kinds of tags, such as {@link ...} tags, @see ... tags and the link markup tag in a {@snippet ...} tag.

Parameters
holder:Element

the element that has the documentation comment containing the information

refTree:DocTree

the tree node containing the information, or null if not available

refSignature:String

the normalized signature of the target of the reference

ref:Element

the target of the reference

isPlain:boolean

true if the link should be presented in "plain" font, or false for "code" font

label:Content

the label for the link, or an empty item to use a default label derived from the signature

reportWarning:BiConsumer<String, Object[]>

a function to report warnings about issues found in the reference

tagletWriter:TagletWriter

the writer providing the context for this call

Returns:Content

the output containing the generated link, or content indicating an error

plainOrCodeback to summary
private Content plainOrCode(boolean plain, Content body)