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

public Class SeeTaglet

extends BaseTaglet
implements InheritableTaglet
Class Inheritance
All Implemented Interfaces
jdk.javadoc.internal.doclets.formats.html.taglets.InheritableTaglet
Imports
java.util.ArrayList, .EnumSet, .List, .Optional, javax.lang.model.element.Element, .ExecutableElement, .TypeElement, .VariableElement, com.sun.source.doctree.DocTree, .SeeTree, .TextTree, jdk.javadoc.doclet.Taglet, jdk.javadoc.internal.doclets.formats.html.ClassWriter, .Contents, .HtmlConfiguration, .HtmlDocletWriter, .SerializedFormWriter, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper, .DocFinder, .DocLink, .DocPath, .DocPaths, .Utils, jdk.javadoc.internal.html.Content, .ContentBuilder, .HtmlTree, .Text

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private final Contents
private HtmlDocletWriter
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
private static Optional<SeeTaglet.Documentation>
public Content
getAllBlockTagOutput(Element holder, TagletWriter tagletWriter)

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

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

Returns the content to be included in the generated output for all instances of block tags handled by this taglet.

private String

Returns:

the simple name from a signature
getSimpleName
(String
the signature
sig
)

Returns the simple name from a signature.

public InheritableTaglet.Output
private boolean

Returns:

true if the label should be rendered in plain font
isPlain
(String
the signature of the target of the reference
refSignature
,
List<? extends DocTree>
the label
label
)

Returns true if the label should be rendered in plain font.

public Content

Returns:

the output
seeTagOutput
(Element
The element that owns the doc comment
holder
,
List<? extends SeeTree>
the list of tags
seeTags
)

Returns the output for @see tags.

private Content

Returns:

the output for a single @see tag
seeTagOutput
(Element
the element that has the documentation comment containing this tag
element
,
SeeTree
the tag
seeTag
)

Returns the output for a single @see tag.

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

Field Detail

contentsback to summary
private final Contents contents
htmlWriterback to summary
private HtmlDocletWriter htmlWriter

Constructor Detail

SeeTagletback to summary
pack-priv SeeTaglet(HtmlConfiguration config)

Method Detail

extractback to summary
private static Optional<SeeTaglet.Documentation> extract(Utils utils, ExecutableElement method)
getAllBlockTagOutputback to summary
public Content getAllBlockTagOutput(Element holder, TagletWriter tagletWriter)

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

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

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

Returns the content to be included in the generated output for all instances of block tags handled by this taglet.

Annotations
@Override
getSimpleNameback to summary
private String getSimpleName(String sig)

Returns the simple name from a signature. If there is a member part in the signature, the simple name is the identifier after the # character. Otherwise, the simple name is the last identifier in the signature.

Parameters
sig:String

the signature

Returns:String

the simple name from a signature

inheritback to summary
public InheritableTaglet.Output inherit(Element dst, Element src, DocTree tag, boolean isFirstSentence)

Implements jdk.javadoc.internal.doclets.formats.html.taglets.InheritableTaglet.inherit.

Annotations
@Override
isPlainback to summary
private boolean isPlain(String refSignature, List<? extends DocTree> label)

Returns true if the label should be rendered in plain font. The method uses a heuristic, to see if the string form of the label is a substring of the reference. Thus, for example:

  • @see MyClass.MY_CONSTANT MY_CONSTANT returns true
  • @see MyClass.MY_CONSTANT a constant returns false
The result will be true (meaning, displayed in plain font) if any of the following are true about the label:
  • There is more than a single item in the list of nodes, suggesting there may be formatting nodes.
  • There is whitespace outside any parentheses, suggesting the label is a phrase
  • There are nested parentheses, or content after the parentheses, which cannot occur in a standalone signature
  • The simple name inferred from the reference does not match any simple name inferred from the label
Parameters
refSignature:String

the signature of the target of the reference

label:List<? extends DocTree>

the label

Returns:boolean

true if the label should be rendered in plain font

seeTagOutputback to summary
public Content seeTagOutput(Element holder, List<? extends SeeTree> seeTags)

Returns the output for @see tags.

Parameters
holder:Element

The element that owns the doc comment

seeTags:List<? extends SeeTree>

the list of tags

Returns:Content

the output

seeTagOutputback to summary
private Content seeTagOutput(Element element, SeeTree seeTag)

Returns the output for a single @see tag.

Parameters
element:Element

the element that has the documentation comment containing this tag

seeTag:SeeTree

the tag

Returns:Content

the output for a single @see tag

jdk.javadoc.internal.doclets.formats.html.taglets back to summary

private final Record SeeTaglet.Documentation

extends Record
Class Inheritance
Record Components
seeTrees:List<? extends SeeTree> 
method:ExecutableElement 

Field Summary

Modifier and TypeField and Description
private final ExecutableElement
method

Record Component accessed by method().

private final List<? extends SeeTree>
seeTrees

Record Component accessed by seeTrees().

Constructor Summary

AccessConstructor and Description
private
Documentation(List<? extends SeeTree> seeTrees, ExecutableElement method)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public ExecutableElement
method()

Record Component getter of method.

public List<? extends SeeTree>
seeTrees()

Record Component getter of seeTrees.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

methodback to summary
private final ExecutableElement method

Record Component accessed by method().

seeTreesback to summary
private final List<? extends SeeTree> seeTrees

Record Component accessed by seeTrees().

Constructor Detail

Documentationback to summary
private Documentation(List<? extends SeeTree> seeTrees, ExecutableElement method)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

methodback to summary
public ExecutableElement method()

Record Component getter of method.

seeTreesback to summary
public List<? extends SeeTree> seeTrees()

Record Component getter of seeTrees.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.