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

public Class ParamTaglet

extends BaseTaglet
implements InheritableTaglet
Class Inheritance
All Implemented Interfaces
jdk.javadoc.internal.doclets.formats.html.taglets.InheritableTaglet
Imports
java.util.EnumSet, .HashMap, .List, .Map, .Optional, javax.lang.model.element.Element, .ElementKind, .ExecutableElement, .TypeElement, com.sun.source.doctree.DocTree, .ParamTree, jdk.javadoc.doclet.Taglet, jdk.javadoc.internal.doclets.formats.html.Contents, .HtmlConfiguration, .HtmlIds, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper, .DocFinder, .Utils, jdk.javadoc.internal.html.Content, .ContentBuilder, .HtmlTree, .Text

A taglet that represents the @param tag.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record
public static enum

Field Summary

Modifier and TypeField and Description
private final Contents
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 Content
convertParam(Element e, ParamTaglet.ParamKind kind, TagletWriter writer, ParamTree paramTag, String name, boolean isFirstParam)

Converts an individual ParamTree to Content, which is prepended with the header if the parameter is first in the list.

private Content
convertParams(Element e, ParamTaglet.ParamKind
the kind of all parameters in the lists
kind
,
List<ParamTree> tags, List<? extends Element> parameters, TagletWriter writer)

Returns a Content representation of a list of ParamTree of the specified kind.

private static Optional<ParamTaglet.Documentation>
extract(Utils utils, ExecutableElement method, Integer position, boolean typeParam)

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 Content
getInheritedTagletOutput(ParamTaglet.ParamKind kind, Element holder, TagletWriter writer, Element param, int position, boolean isFirst)

Tries to inherit documentation for a specific parameter (element).

private Content
public InheritableTaglet.Output
private static Map<String, Integer>

Returns:

a name-position map
mapNameToPosition
(Utils utils, List<? extends Element>
the list of parameters from a type or an executable member
params
)

Given a list of parameter elements, returns a name-position map.

private Content
paramTagOutput(Element element, ParamTree paramTag, String paramName)

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

Field Detail

contentsback to summary
private final Contents contents

Constructor Detail

ParamTagletback to summary
pack-priv ParamTaglet(HtmlConfiguration config)

Method Detail

convertParamback to summary
private Content convertParam(Element e, ParamTaglet.ParamKind kind, TagletWriter writer, ParamTree paramTag, String name, boolean isFirstParam)

Converts an individual ParamTree to Content, which is prepended with the header if the parameter is first in the list.

convertParamsback to summary
private Content convertParams(Element e, ParamTaglet.ParamKind kind, List<ParamTree> tags, List<? extends Element> parameters, TagletWriter writer)

Returns a Content representation of a list of ParamTree of the specified kind.

This method correlates a ParamTree with a parameter Element by name. Once it's done, a particular ParamTree is addressed by the position (index) of the correlated Element in the list of parameter elements. This is needed for documentation inheritance because the corresponding parameters in the inheritance hierarchy may be named differently.

This method warns about @param tags that do not map to parameter elements and param tags that are duplicated.

Parameters
kind:ParamTaglet.ParamKind

the kind of all parameters in the lists

extractback to summary
private static Optional<ParamTaglet.Documentation> extract(Utils utils, ExecutableElement method, Integer position, boolean typeParam)
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
getInheritedTagletOutputback to summary
private Content getInheritedTagletOutput(ParamTaglet.ParamKind kind, Element holder, TagletWriter writer, Element param, int position, boolean isFirst)

Tries to inherit documentation for a specific parameter (element). If unsuccessful, the returned content is empty.

getParamHeaderback to summary
private Content getParamHeader(ParamTaglet.ParamKind kind)
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
mapNameToPositionback to summary
private static Map<String, Integer> mapNameToPosition(Utils utils, List<? extends Element> params)

Given a list of parameter elements, returns a name-position map.

Parameters
params:List<? extends Element>

the list of parameters from a type or an executable member

Returns:Map<String, Integer>

a name-position map

paramTagOutputback to summary
private Content paramTagOutput(Element element, ParamTree paramTag, String paramName)
jdk.javadoc.internal.doclets.formats.html.taglets back to summary

private final Record ParamTaglet.Documentation

extends Record
Class Inheritance
Record Components
paramTree:ParamTree 
method:ExecutableElement 

Field Summary

Modifier and TypeField and Description
private final ExecutableElement
method

Record Component accessed by method().

private final ParamTree
paramTree

Record Component accessed by paramTree().

Constructor Summary

AccessConstructor and Description
private

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 ParamTree
paramTree()

Record Component getter of paramTree.

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().

paramTreeback to summary
private final ParamTree paramTree

Record Component accessed by paramTree().

Constructor Detail

Documentationback to summary
private Documentation(ParamTree paramTree, 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.

paramTreeback to summary
public ParamTree paramTree()

Record Component getter of paramTree.

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.

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

public final Enum ParamTaglet.ParamKind

extends Enum<ParamTaglet.ParamKind>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ParamTaglet.ParamKind
PARAMETER

Parameter of an executable element.

public static final ParamTaglet.ParamKind
RECORD_COMPONENT

State components of a record.

public static final ParamTaglet.ParamKind
TYPE_PARAMETER

Type parameters of an executable element or type element.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ParamTaglet.ParamKind
public static ParamTaglet.ParamKind[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PARAMETERback to summary
public static final ParamTaglet.ParamKind PARAMETER

Parameter of an executable element.

RECORD_COMPONENTback to summary
public static final ParamTaglet.ParamKind RECORD_COMPONENT

State components of a record.

TYPE_PARAMETERback to summary
public static final ParamTaglet.ParamKind TYPE_PARAMETER

Type parameters of an executable element or type element.

Constructor Detail

ParamKindback to summary
private ParamKind()

Method Detail

valueOfback to summary
public static ParamTaglet.ParamKind valueOf(String name)
valuesback to summary
public static ParamTaglet.ParamKind[] values()