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

public Class ConstantsSummaryWriter

extends HtmlDocletWriter
Class Inheritance
Imports
java.util.ArrayList, .Collection, .HashSet, .List, .Set, .SortedSet, .TreeSet, javax.lang.model.element.Element, .Modifier, .PackageElement, .TypeElement, .VariableElement, jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode, jdk.javadoc.internal.doclets.formats.html.markup.BodyContents, .HtmlStyles, jdk.javadoc.internal.doclets.toolkit.DocletException, jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException, .DocPaths, .IndexItem, .VisibleMemberTable, jdk.javadoc.internal.html.Content, .ContentBuilder, .Entity, .HtmlId, .HtmlTag, .HtmlTree, .Text

Write the Constants Summary Page in HTML format.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
ConstantsSummaryWriter.ConstantFieldBuilder

Builder for the table of fields with constant values.

Field Summary

Modifier and TypeField and Description
private final BodyContents
private final TableHeader
private TypeElement
private PackageElement
private TypeElement
currentTypeElement

The current class being documented.

private boolean
private static final int
MAX_CONSTANT_VALUE_INDEX_LENGTH

The maximum number of package directories shown in the headings of the constant values contents list and headings.

protected final Set<String>
packageGroupHeadings

The set of package-group headings.

private HtmlTree
summarySection

The HTML tree for constant values summary currently being written.

protected final Set<TypeElement>
typeElementsWithConstFields

The set of type elements that have constant fields.

Inherited from jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter:
comparatorsconfigurationcontentsdocPathshtmlIdsindexAnchorTablelinksmainBodyScriptmessagesoptionspathpathToRootresourcestableOfContentsutilswinTitle

Constructor Summary

AccessConstructor and Description
public
ConstantsSummaryWriter(HtmlConfiguration
the configuration used in this run of the standard doclet.
configuration
)

Construct a ConstantsSummaryWriter.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addClassConstant(Content fromClassConstant)

pack-priv void
pack-priv void
pack-priv void
pack-priv void
addLinkToTableOfContents(String abbrevPackageName)

pack-priv void
addPackageGroup(String abbrevPackageName, Content toContent)

protected void
buildClassConstantSummary()

Builds the summary for the current class.

protected void
buildConstantMembers(Content
the content to which the table of constant members will be added
target
)

Builds the summary of constant members in the class.

protected void
buildConstantSummaries()

Builds the summary for each documented package.

protected void
buildConstantSummary()

Builds the constant summary page.

protected void
buildContents()

Builds the list of contents for the groups of packages appearing in the constants summary page.

protected void
buildPackageHeader(Content
the content to which the package header will be added
target
)

Builds the header for the given package.

public void
buildPage()

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

The top-level method to generate and write the page represented by this writer.

public String

Returns:

the abbreviated name for a package, containing the leading segments of the name
getAbbrevPackageName
(PackageElement
the package
pkg
)

Returns the abbreviated name for a package, containing the leading segments of the name.

pack-priv Content
pack-priv Content
pack-priv Content
private Content

Returns:

the name column of the constant table row
getNameColumn
(VariableElement
the field to be documented.
member
)

Get the name column for the constant summary table row.

private Content

Returns:

the type column of the constant table row
getTypeColumn
(VariableElement
the field to be documented.
member
)

Get the type column for the constant summary table row.

private Content

Returns:

the value column of the constant table row
getValue
(VariableElement
the field to be documented.
member
)

Get the value column for the constant summary table row.

private boolean

Returns:

true if the given package has constant fields to document
hasConstantField
(PackageElement
the package to be checked
pkg
)

Returns true if the given package has constant fields to document.

private boolean

Returns:

true if the given class has constant fields to document
hasConstantField
(TypeElement
the class to be checked
typeElement
)

Returns true if the given class has constant fields to document.

pack-priv void
Inherited from jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter:
addInlineCommentaddInlineCommentaddInlineDeprecatedCommentaddPreQualifiedClassLinkaddPreQualifiedClassLinkaddPreQualifiedStrongClassLinkaddPreviewCommentaddPreviewInfoaddPreviewSummaryaddRestrictedInfoaddRestrictedSummaryaddSrcLinkaddSummaryCommentaddSummaryCommentaddSummaryDeprecatedCommentaddTagsInfocommentTagsToContentcommentTagsToContentcommentTagsToContentcreateTableOfContentsgetAnnotationInfogetAnnotationInfogetAnnotationsgetBlockTagOutputgetBlockTagOutputgetBodygetBodyStylegetCrossClassLinkgetCrossModuleLinkgetCrossPackageLinkgetCurrentTypeElementgetDeprecatedPhrasegetDescriptiongetDocLinkgetDocLinkgetDocLinkgetDocLinkgetDocLinkgetEnclosingPackageNamegetFileTitlegetFootergetGeneratorgetHeadergetHeadergetLinkgetLocalizedPackageNamegetLocalStylesheetsgetModuleLinkgetModuleLinkgetNavBargetNavLinkToOverviewTreegetPackageLabelgetPackageLinkgetPackageLinkgetPackageTableHeadergetPreQualifiedClassLinkgetQualifiedClassLinkgetTagletWriterInstancegetTagletWriterInstancegetTypeParameterLinksgetWindowTitlehasSerializationOverviewTagsignoreNonInlineTaginvalidTagOutputisIndexablepathStringpathStringprintHtmlDocumentprintHtmlDocumentprintHtmlDocumentreplaceDocRootDirresolveExternalSpecURIwriteGenerating

Field Detail

bodyContentsback to summary
private final BodyContents bodyContents
constantsTableHeaderback to summary
private final TableHeader constantsTableHeader
currentClassback to summary
private TypeElement currentClass
currentPackageback to summary
private PackageElement currentPackage
currentTypeElementback to summary
private TypeElement currentTypeElement

The current class being documented.

hasConstantsback to summary
private boolean hasConstants
MAX_CONSTANT_VALUE_INDEX_LENGTHback to summary
private static final int MAX_CONSTANT_VALUE_INDEX_LENGTH

The maximum number of package directories shown in the headings of the constant values contents list and headings.

packageGroupHeadingsback to summary
protected final Set<String> packageGroupHeadings

The set of package-group headings.

summarySectionback to summary
private HtmlTree summarySection

The HTML tree for constant values summary currently being written.

typeElementsWithConstFieldsback to summary
protected final Set<TypeElement> typeElementsWithConstFields

The set of type elements that have constant fields.

Constructor Detail

ConstantsSummaryWriterback to summary
public ConstantsSummaryWriter(HtmlConfiguration configuration)

Construct a ConstantsSummaryWriter.

Parameters
configuration:HtmlConfiguration

the configuration used in this run of the standard doclet.

Method Detail

addClassConstantback to summary
pack-priv void addClassConstant(Content fromClassConstant)
addConstantMembersback to summary
pack-priv void addConstantMembers(TypeElement typeElement, Collection<VariableElement> fields, Content target)
addConstantSummariesback to summary
pack-priv void addConstantSummaries(Content content)
addFooterback to summary
pack-priv void addFooter()
addLinkToTableOfContentsback to summary
pack-priv void addLinkToTableOfContents(String abbrevPackageName)
addPackageGroupback to summary
pack-priv void addPackageGroup(String abbrevPackageName, Content toContent)
buildClassConstantSummaryback to summary
protected void buildClassConstantSummary()

Builds the summary for the current class.

buildConstantMembersback to summary
protected void buildConstantMembers(Content target)

Builds the summary of constant members in the class.

Parameters
target:Content

the content to which the table of constant members will be added

buildConstantSummariesback to summary
protected void buildConstantSummaries()

Builds the summary for each documented package.

buildConstantSummaryback to summary
protected void buildConstantSummary() throws DocletException

Builds the constant summary page.

Exceptions
DocletException:
if there is a problem while building the documentation
buildContentsback to summary
protected void buildContents()

Builds the list of contents for the groups of packages appearing in the constants summary page.

buildPackageHeaderback to summary
protected void buildPackageHeader(Content target)

Builds the header for the given package.

Parameters
target:Content

the content to which the package header will be added

buildPageback to summary
public void buildPage() throws DocletException

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

Doc from jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.buildPage.

The top-level method to generate and write the page represented by this writer.

Annotations
@Override
Exceptions
DocletException:
if a problem occurs while building or writing the page
getAbbrevPackageNameback to summary
public String getAbbrevPackageName(PackageElement pkg)

Returns the abbreviated name for a package, containing the leading segments of the name.

Parameters
pkg:PackageElement

the package

Returns:String

the abbreviated name for a package, containing the leading segments of the name

getClassConstantHeaderback to summary
pack-priv Content getClassConstantHeader()
getContentsHeaderback to summary
pack-priv Content getContentsHeader()
getHeaderback to summary
pack-priv Content getHeader()
getNameColumnback to summary
private Content getNameColumn(VariableElement member)

Get the name column for the constant summary table row.

Parameters
member:VariableElement

the field to be documented.

Returns:Content

the name column of the constant table row

getTypeColumnback to summary
private Content getTypeColumn(VariableElement member)

Get the type column for the constant summary table row.

Parameters
member:VariableElement

the field to be documented.

Returns:Content

the type column of the constant table row

getValueback to summary
private Content getValue(VariableElement member)

Get the value column for the constant summary table row.

Parameters
member:VariableElement

the field to be documented.

Returns:Content

the value column of the constant table row

hasConstantFieldback to summary
private boolean hasConstantField(PackageElement pkg)

Returns true if the given package has constant fields to document.

Parameters
pkg:PackageElement

the package to be checked

Returns:boolean

true if the given package has constant fields to document

hasConstantFieldback to summary
private boolean hasConstantField(TypeElement typeElement)

Returns true if the given class has constant fields to document.

Parameters
typeElement:TypeElement

the class to be checked

Returns:boolean

true if the given class has constant fields to document

printDocumentback to summary
pack-priv void printDocument(Content content) throws DocFileIOException
jdk.javadoc.internal.doclets.formats.html back to summary

private Class ConstantsSummaryWriter.ConstantFieldBuilder

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.javadoc.internal.doclets.formats.html.ConstantsSummaryWriter.ConstantFieldBuilder

Builder for the table of fields with constant values.

Field Summary

Modifier and TypeField and Description
protected TypeElement
typeElement

The type element that we are examining constants for.

Constructor Summary

AccessConstructor and Description
public
ConstantFieldBuilder(TypeElement
the type element that we are examining constants for
typeElement
)

Constructs a ConstantFieldBuilder.

Method Summary

Modifier and TypeMethod and Description
protected void
buildMembersSummary(Content
the content to which the table of class constants will be added
target
)

Builds the table of constants for a given class.

protected SortedSet<VariableElement>

Returns:

a set of visible constant fields for the given type
members
()

Returns a set of visible constant fields for the given type.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeElementback to summary
protected TypeElement typeElement

The type element that we are examining constants for.

Constructor Detail

ConstantFieldBuilderback to summary
public ConstantFieldBuilder(TypeElement typeElement)

Constructs a ConstantFieldBuilder.

Parameters
typeElement:TypeElement

the type element that we are examining constants for

Method Detail

buildMembersSummaryback to summary
protected void buildMembersSummary(Content target)

Builds the table of constants for a given class.

Parameters
target:Content

the content to which the table of class constants will be added

membersback to summary
protected SortedSet<VariableElement> members()

Returns a set of visible constant fields for the given type.

Returns:SortedSet<VariableElement>

a set of visible constant fields for the given type