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

public abstract Class SummaryListWriter<B extends SummaryAPIListBuilder>

extends SubWriterHolderWriter
Class Inheritance
Known Direct Subclasses
jdk.javadoc.internal.doclets.formats.html.DeprecatedListWriter, jdk.javadoc.internal.doclets.formats.html.NewAPIListWriter, jdk.javadoc.internal.doclets.formats.html.PreviewListWriter, jdk.javadoc.internal.doclets.formats.html.RestrictedListWriter
Type Parameters
<B>
a builder, to determine the elements to be included in the summary
Imports
java.util.ArrayList, .List, .SortedSet, java.util.function.Function, javax.lang.model.element.Element, .ModuleElement, .PackageElement, jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode, jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles, jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException, .DocPath, .SummaryAPIListBuilder, .SummaryAPIListBuilder.SummaryElementKind, jdk.javadoc.internal.html.Content, .ContentBuilder, .HtmlAttr, .HtmlId, .HtmlStyle, .HtmlTree, .Script, .Text

Base class for generating a summary page that lists elements with a common characteristic, such as deprecated elements, preview elements, and so on.

Note

the use of "Summary" in this context is distinct from the use of "summary" in the context of AbstractMemberWriter#buildSummary(Content).

Field Summary

Modifier and TypeField and Description
protected final B
builder

The summary list builder

protected final String
protected final String
Inherited from jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter:
bodyContents

Constructor Summary

AccessConstructor and Description
public
SummaryListWriter(HtmlConfiguration
the configuration for this doclet
configuration
,
DocPath
the file to be generated
filename
,
B
the summary list builder
builder
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
protected void
addComments(Element
the element for which the summary text should be added
e
,
Content
the content to which the text should be added
desc
)

Add summary text for the given element.

protected void
addContentSelectors(Content
the content to which the UI should be added
target
)

Allow Subclasses to add a content selector UI such as a row of radio buttons near the top of the page.

protected void
addSummaries(Content
the content to add the API summary tables to
content
)

Add all API summary tables to the main content of the page.

protected void
addSummaryAPI(SortedSet<Element>
list of API summary elements
apiList
,
HtmlId
the id attribute of the table
id
,
String
the caption for the summary table
headingKey
,
String
table header key for the summary table
headerKey
,
Content
the content to which the summary table will be added
content
)

Add summary information to the documentation

protected void
addTableTabs(Table<Element>
the element table
table
,
String
the key for the caption (default tab)
headingKey
)

Allow subclasses to add extra tabs to the element tables.

public void
protected Content

Returns:

a content object containing the checkbox input
getCheckbox
(Content
The label
label
,
String
the id of the selected content
id
,
String
the prefix for the HTML id
htmlPrefix
)

Create a checkbox input element and associated label for selecting content on a summary page.

protected HtmlStyle[]

Returns:

the styles to use for table columns
getColumnStyles
()

Gets the array of styles to use for table columns.

protected abstract String

Returns:

the page descrition, for the <meta> element
getDescription
()

Returns the page descrition, for the <meta> element.

protected Content

Returns:

content for extra content or null
getExtraContent
(Element
the element
element
)

Allow subclasses to add an extra table column for an element.

protected abstract Content

Returns:

the heading for the page
getHeadContent
()

Returns the heading for the page.

public HtmlTree

Returns:

the header for the API Summary listing
getHeader
(Navigation.PageMode
page mode to use
pageMode
,
String
page title resource key
titleKey
)

Returns the header for the API Summary listing.

private String
protected String
protected abstract Navigation.PageMode

Returns:

the page mode to use
getPageMode
()

Returns the page mode to use.

protected Content

Returns:

the table caption
getTableCaption
(String
the key for the table heading
headingKey
)

Returns the caption for the table with the given headingKey.

protected TableHeader

Returns:

the table header
getTableHeader
(String
the header key for the first table column
headerKey
)

Gets the table header to use for a table with the first column identified by headerKey.

protected abstract String

Returns:

the title for the page
getTitleKey
()

Returns the title for the page.

protected boolean

Returns:

true if the contents list should be generated, false if not
showContentsList
()

Returns true if the contents list should be generated, false if not.

Inherited from jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter:
addClassContentaddIndexCommentaddIndexCommentaddInheritedMemberSummaryaddInheritedSummaryHeaderaddSummaryaddSummaryHeaderaddSummaryLinkCommentaddSummaryLinkCommentgetContentHeadergetDetailsListgetDetailsListItemgetMembergetMembergetMemberInheritedgetMemberListgetMemberListItemgetMemberSummarygetPropertyHelpergetSummariesListgetSummariesListItem

Field Detail

builderback to summary
protected final B builder

The summary list builder

ID_ALLback to summary
protected final String ID_ALL
ID_OTHERback to summary
protected final String ID_OTHER

Constructor Detail

SummaryListWriterback to summary
public SummaryListWriter(HtmlConfiguration configuration, DocPath filename, B builder)

Constructor.

Parameters
configuration:HtmlConfiguration

the configuration for this doclet

filename:DocPath

the file to be generated

builder:B

the summary list builder

Method Detail

addCommentsback to summary
protected void addComments(Element e, Content desc)

Add summary text for the given element.

Parameters
e:Element

the element for which the summary text should be added

desc:Content

the content to which the text should be added

addContentSelectorsback to summary
protected void addContentSelectors(Content target)

Allow Subclasses to add a content selector UI such as a row of radio buttons near the top of the page. This method does not add anything.

Parameters
target:Content

the content to which the UI should be added

addSummariesback to summary
protected void addSummaries(Content content)

Add all API summary tables to the main content of the page.

Parameters
content:Content

the content to add the API summary tables to

addSummaryAPIback to summary
protected void addSummaryAPI(SortedSet<Element> apiList, HtmlId id, String headingKey, String headerKey, Content content)

Add summary information to the documentation

Parameters
apiList:SortedSet<Element>

list of API summary elements

id:HtmlId

the id attribute of the table

headingKey:String

the caption for the summary table

headerKey:String

table header key for the summary table

content:Content

the content to which the summary table will be added

addTableTabsback to summary
protected void addTableTabs(Table<Element> table, String headingKey)

Allow subclasses to add extra tabs to the element tables. This method does not add any tabs.

Parameters
table:Table<Element>

the element table

headingKey:String

the key for the caption (default tab)

buildPageback to summary
public void buildPage() throws DocFileIOException

Implements abstract jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.buildPage.

Generate the API summary.

Annotations
@Override
Exceptions
DocFileIOException:
if there is a problem writing the summary list
getCheckboxback to summary
protected Content getCheckbox(Content label, String id, String htmlPrefix)

Create a checkbox input element and associated label for selecting content on a summary page.

Parameters
label:Content

The label

id:String

the id of the selected content

htmlPrefix:String

the prefix for the HTML id

Returns:Content

a content object containing the checkbox input

getColumnStylesback to summary
protected HtmlStyle[] getColumnStyles()

Gets the array of styles to use for table columns. The length of the returned array must match the number of column headers returned by getTableHeader(String).

Returns:HtmlStyle[]

the styles to use for table columns

getDescriptionback to summary
protected abstract String getDescription()

Returns the page descrition, for the <meta> element.

Returns:String

the page descrition, for the <meta> element

getExtraContentback to summary
protected Content getExtraContent(Element element)

Allow subclasses to add an extra table column for an element. Return null for no extra content.

Parameters
element:Element

the element

Returns:Content

content for extra content or null

getHeadContentback to summary
protected abstract Content getHeadContent()

Returns the heading for the page.

Returns:Content

the heading for the page

getHeaderback to summary
public HtmlTree getHeader(Navigation.PageMode pageMode, String titleKey)

Returns the header for the API Summary listing.

Parameters
pageMode:Navigation.PageMode

page mode to use

titleKey:String

page title resource key

Returns:HtmlTree

the header for the API Summary listing

getHeaderKeyback to summary
private String getHeaderKey(SummaryAPIListBuilder.SummaryElementKind kind)
getHeadingKeyback to summary
protected String getHeadingKey(SummaryAPIListBuilder.SummaryElementKind kind)
getPageModeback to summary
protected abstract Navigation.PageMode getPageMode()

Returns the page mode to use.

Returns:Navigation.PageMode

the page mode to use

getTableCaptionback to summary
protected Content getTableCaption(String headingKey)

Returns the caption for the table with the given headingKey.

Parameters
headingKey:String

the key for the table heading

Returns:Content

the table caption

getTableHeaderback to summary
protected TableHeader getTableHeader(String headerKey)

Gets the table header to use for a table with the first column identified by headerKey.

Parameters
headerKey:String

the header key for the first table column

Returns:TableHeader

the table header

getTitleKeyback to summary
protected abstract String getTitleKey()

Returns the title for the page.

Returns:String

the title for the page

showContentsListback to summary
protected boolean showContentsList()

Returns true if the contents list should be generated, false if not.

Returns:boolean

true if the contents list should be generated, false if not