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

public Class MethodWriter

extends AbstractExecutableMemberWriter
Class Inheritance
Known Direct Subclasses
jdk.javadoc.internal.doclets.formats.html.SerialMethodWriter
Imports
java.util.Collection, .Optional, .SortedSet, .TreeSet, javax.lang.model.element.Element, .ExecutableElement, .TypeElement, javax.lang.model.type.TypeMirror, jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles, jdk.javadoc.internal.doclets.toolkit.BaseOptions, jdk.javadoc.internal.doclets.toolkit.util.DocFinder, .Utils, .VisibleMemberTable, jdk.javadoc.internal.html.Content, .ContentBuilder, .Entity, .HtmlId, .HtmlTree, .Text

Writes method documentation in HTML format.

Field Summary

Modifier and TypeField and Description
private ExecutableElement
currentMethod

The index of the current field that is being documented at this point in time.

Constructor Summary

AccessConstructor and Description
public
MethodWriter(ClassWriter
the writer for the class that the methods belong to.\
writer
)

Construct a new MethodWriterImpl.

public
MethodWriter(SubWriterHolderWriter
the writer for the class that the methods belong to.
writer
,
TypeElement
the class
typeElement
)

Construct a new MethodWriterImpl.

public
MethodWriter(SubWriterHolderWriter
The writer for the class that the methods belong to.
writer
)

Construct a new MethodWriterImpl.

Method Summary

Modifier and TypeMethod and Description
protected void
addComments(TypeMirror holderType, ExecutableElement method, Content methodContent)

protected void
addDeprecated(ExecutableElement method, Content methodContent)

protected static void
addImplementsInfo(HtmlDocletWriter
the writer for the method
writer
,
ExecutableElement
the method
method
,
Collection<ExecutableElement>
implemented methods
methods
,
Content
the definition list
dl
)

Adds "implements" information for a method (if appropriate) into a definition list.

public void
protected static void
addOverridden(HtmlDocletWriter
the writer for the element
writer
,
TypeMirror
the superclass
overriddenType
,
ExecutableElement
the method
method
,
Content
the list in which to add the information.
dl
)

Adds "overrides" or "specified by" information about a method (if appropriate) into a definition list.

protected void
protected void
public void
addSummaryLabel(Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryLabel.

Adds the summary label for the member.

protected void
addSummaryType(Element member, Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryType.

Adds the summary type for the member.

protected void
addTags(ExecutableElement method, Content methodContent)

protected void
public void
buildDetails(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildDetails.

Builds the list of "details" for all members of this kind.

protected void
buildMethodComments(Content
the content to which the documentation will be added
methodContent
)

Build the comments for the method.

protected void
buildMethodDoc(Content
the content to which the documentation will be added
detailsList
)

Build the method documentation.

protected void
protected void
buildRestrictedInfo(Content
the content to which the documentation will be added
target
)

Builds the restricted method info.

protected void
public void
buildSummary(Content summariesList, Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildSummary.

Adds the given summary to the list of summaries.

protected void
buildTagInfo(Content
the content to which the documentation will be added
methodContent
)

Build the tag information.

protected Table<Element>
createInheritedSummaryTable(TypeElement typeElement)

Overrides jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createInheritedSummaryTable.

Creates a summary table for members of the kind supported by this writer inherited from typeElement.

protected Table<Element>
createSummaryTable()

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createSummaryTable.

Creates the summary table for this element.

protected HtmlId
getInheritedSummaryId(TypeElement typeElement)

Overrides jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getInheritedSummaryId.

Creates an id for a summary table for members of the kind supported by this writer inherited from typeElement.

public Content
getMemberSummaryHeader(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getMemberSummaryHeader.

Returns the member summary header for the given class.

protected Content
getMethodDetails(Content methodDetailsHeader, Content methodDetails)

protected Content
protected Content
protected Content

Returns:

the return type
getReturnType
(ExecutableElement
the method being documented.
method
)

Get the return type for the given method.

protected Content
public TableHeader
getSummaryTableHeader(Element member)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getSummaryTableHeader.

Returns the summary table header for the member.

Inherited from jdk.javadoc.internal.doclets.formats.html.AbstractExecutableMemberWriter:
addInheritedSummaryLinkaddParamaddParametersaddReceiveraddSummaryLinkaddTypeParametersgetExceptionsgetParametersgetSummaryLinkgetTypeParametersimplementsMethodInIntfacisAnnotatedReceiver

Field Detail

currentMethodback to summary
private ExecutableElement currentMethod

The index of the current field that is being documented at this point in time.

Constructor Detail

MethodWriterback to summary
public MethodWriter(ClassWriter writer)

Construct a new MethodWriterImpl.

Parameters
writer:ClassWriter

the writer for the class that the methods belong to.\

MethodWriterback to summary
public MethodWriter(SubWriterHolderWriter writer, TypeElement typeElement)

Construct a new MethodWriterImpl.

Parameters
writer:SubWriterHolderWriter

the writer for the class that the methods belong to.

typeElement:TypeElement

the class

MethodWriterback to summary
public MethodWriter(SubWriterHolderWriter writer)

Construct a new MethodWriterImpl.

Parameters
writer:SubWriterHolderWriter

The writer for the class that the methods belong to.

Method Detail

addCommentsback to summary
protected void addComments(TypeMirror holderType, ExecutableElement method, Content methodContent)
addDeprecatedback to summary
protected void addDeprecated(ExecutableElement method, Content methodContent)
addImplementsInfoback to summary
protected static void addImplementsInfo(HtmlDocletWriter writer, ExecutableElement method, Collection<ExecutableElement> methods, Content dl)

Adds "implements" information for a method (if appropriate) into a definition list.

Parameters
writer:HtmlDocletWriter

the writer for the method

method:ExecutableElement

the method

methods:Collection<ExecutableElement>

implemented methods

dl:Content

the definition list

addInheritedSummaryLabelback to summary
public void addInheritedSummaryLabel(TypeElement typeElement, Content content)

Overrides jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addInheritedSummaryLabel.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addInheritedSummaryLabel.

Adds inherited summary label for the member.

Annotations
@Override
addOverriddenback to summary
protected static void addOverridden(HtmlDocletWriter writer, TypeMirror overriddenType, ExecutableElement method, Content dl)

Adds "overrides" or "specified by" information about a method (if appropriate) into a definition list.

Parameters
writer:HtmlDocletWriter

the writer for the element

overriddenType:TypeMirror

the superclass

method:ExecutableElement

the method

dl:Content

the list in which to add the information.

addPreviewback to summary
protected void addPreview(ExecutableElement method, Content content)
addRestrictedback to summary
protected void addRestricted(ExecutableElement method, Content content)
addSummaryLabelback to summary
public void addSummaryLabel(Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryLabel.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryLabel.

Adds the summary label for the member.

Annotations
@Override
addSummaryTypeback to summary
protected void addSummaryType(Element member, Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryType.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addSummaryType.

Adds the summary type for the member.

Annotations
@Override
addTagsback to summary
protected void addTags(ExecutableElement method, Content methodContent)
buildDeprecationInfoback to summary
protected void buildDeprecationInfo(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildDeprecationInfo.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildDeprecationInfo.

Builds the deprecation info.

Annotations
@Override
buildDetailsback to summary
public void buildDetails(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildDetails.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildDetails.

Builds the list of "details" for all members of this kind.

Annotations
@Override
buildMethodCommentsback to summary
protected void buildMethodComments(Content methodContent)

Build the comments for the method. Do nothing if BaseOptions#noComment() is set to true.

Parameters
methodContent:Content

the content to which the documentation will be added

buildMethodDocback to summary
protected void buildMethodDoc(Content detailsList)

Build the method documentation.

Parameters
detailsList:Content

the content to which the documentation will be added

buildPreviewInfoback to summary
protected void buildPreviewInfo(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildPreviewInfo.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildPreviewInfo.

Builds the preview info.

Annotations
@Override
buildRestrictedInfoback to summary
protected void buildRestrictedInfo(Content target)

Builds the restricted method info.

Parameters
target:Content

the content to which the documentation will be added

buildSignatureback to summary
protected void buildSignature(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildSignature.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildSignature.

Builds the signature.

Annotations
@Override
buildSummaryback to summary
public void buildSummary(Content summariesList, Content content)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildSummary.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.buildSummary.

Adds the given summary to the list of summaries.

Annotations
@Override
buildTagInfoback to summary
protected void buildTagInfo(Content methodContent)

Build the tag information.

Parameters
methodContent:Content

the content to which the documentation will be added

createInheritedSummaryTableback to summary
protected Table<Element> createInheritedSummaryTable(TypeElement typeElement)

Overrides jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createInheritedSummaryTable.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createInheritedSummaryTable.

Creates a summary table for members of the kind supported by this writer inherited from typeElement.

Annotations
@Override
createSummaryTableback to summary
protected Table<Element> createSummaryTable()

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createSummaryTable.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.createSummaryTable.

Creates the summary table for this element. The table should be created and initialized if needed, and configured so that it is ready to add content with Table#addRow(Content[]) and similar methods.

Annotations
@Override
getInheritedSummaryIdback to summary
protected HtmlId getInheritedSummaryId(TypeElement typeElement)

Overrides jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getInheritedSummaryId.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getInheritedSummaryId.

Creates an id for a summary table for members of the kind supported by this writer inherited from typeElement.

Annotations
@Override
getMemberSummaryHeaderback to summary
public Content getMemberSummaryHeader(Content target)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getMemberSummaryHeader.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getMemberSummaryHeader.

Returns the member summary header for the given class.

Annotations
@Override
getMethodDetailsback to summary
protected Content getMethodDetails(Content methodDetailsHeader, Content methodDetails)
getMethodDetailsHeaderback to summary
protected Content getMethodDetailsHeader(Content content)
getMethodHeaderback to summary
protected Content getMethodHeader(ExecutableElement method)
getReturnTypeback to summary
protected Content getReturnType(ExecutableElement method)

Get the return type for the given method.

Parameters
method:ExecutableElement

the method being documented.

Returns:Content

the return type

getSignatureback to summary
protected Content getSignature(ExecutableElement method)
getSummaryTableHeaderback to summary
public TableHeader getSummaryTableHeader(Element member)

Implements abstract jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getSummaryTableHeader.

Doc from jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.getSummaryTableHeader.

Returns the summary table header for the member.

Annotations
@Override