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

public Class InheritDocTaglet

extends BaseTaglet
Class Inheritance
Imports
java.util.EnumSet, .List, javax.lang.model.element.Element, .ElementKind, .ExecutableElement, .TypeElement, com.sun.source.doctree.DocTree, .InheritDocTree, com.sun.source.util.DocTreePath, jdk.javadoc.doclet.Taglet.Location, jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper, .DocFinder, .DocFinder.Result, .Utils, .VisibleMemberTable, jdk.javadoc.internal.html.Content

A taglet that represents the {@inheritDoc} tag.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

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

Constructor Summary

AccessConstructor and Description
pack-priv
InheritDocTaglet(HtmlConfiguration config)

Construct a new InheritDocTaglet.

Method Summary

Modifier and TypeMethod and Description
private static DocFinder.Result<InheritDocTaglet.Documentation>
extractMainDescription(ExecutableElement m, boolean extractFirstSentenceOnly, Utils utils)

public Content
getInlineTagOutput(Element e, DocTree inheritDoc, 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.

private Content
retrieveInheritedDocumentation(TagletWriter
the writer that is writing the output.
writer
,
ExecutableElement
the method that we are documenting.
method
,
InheritDocTree
the {@inheritDoc} tag
inheritDoc
,
boolean
true if we only want to inherit the first sentence
isFirstSentence
)

Given an element and @inheritDoc tag in that element's doc comment, returns the (recursive) expansion of that tag.

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

Constructor Detail

InheritDocTagletback to summary
pack-priv InheritDocTaglet(HtmlConfiguration config)

Construct a new InheritDocTaglet.

Method Detail

extractMainDescriptionback to summary
private static DocFinder.Result<InheritDocTaglet.Documentation> extractMainDescription(ExecutableElement m, boolean extractFirstSentenceOnly, Utils utils)
getInlineTagOutputback to summary
public Content getInlineTagOutput(Element e, DocTree inheritDoc, 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
retrieveInheritedDocumentationback to summary
private Content retrieveInheritedDocumentation(TagletWriter writer, ExecutableElement method, InheritDocTree inheritDoc, boolean isFirstSentence)

Given an element and @inheritDoc tag in that element's doc comment, returns the (recursive) expansion of that tag.

This method does not expand all {@inheritDoc} tags in the given element's doc comment. To do this, the method must be called for every such tag.

Parameters
writer:TagletWriter

the writer that is writing the output.

method:ExecutableElement

the method that we are documenting.

inheritDoc:InheritDocTree

the {@inheritDoc} tag

isFirstSentence:boolean

true if we only want to inherit the first sentence

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

private final Record InheritDocTaglet.Documentation

extends Record
Class Inheritance
Record Components
mainDescription:List<? extends DocTree> 
method:ExecutableElement 

Field Summary

Modifier and TypeField and Description
private final List<? extends DocTree>
mainDescription

Record Component accessed by mainDescription().

private final ExecutableElement
method

Record Component accessed by method().

Constructor Summary

AccessConstructor and Description
private
Documentation(List<? extends DocTree> mainDescription, 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 List<? extends DocTree>
mainDescription()

Record Component getter of mainDescription.

public ExecutableElement
method()

Record Component getter of method.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

mainDescriptionback to summary
private final List<? extends DocTree> mainDescription

Record Component accessed by mainDescription().

methodback to summary
private final ExecutableElement method

Record Component accessed by method().

Constructor Detail

Documentationback to summary
private Documentation(List<? extends DocTree> mainDescription, 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.

mainDescriptionback to summary
public List<? extends DocTree> mainDescription()

Record Component getter of mainDescription.

methodback to summary
public ExecutableElement method()

Record Component getter of method.

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.