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

public Class PackageWriter

extends HtmlDocletWriter
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .List, .SortedSet, java.util.function.Predicate, java.util.regex.Pattern, java.util.stream.Collectors, javax.lang.model.element.ModuleElement, .PackageElement, .TypeElement, com.sun.source.doctree.DeprecatedTree, .DocTree, 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.CommentHelper, .DocFileIOException, .DocPath, .DocPaths, jdk.javadoc.internal.html.Content, .ContentBuilder, .HtmlTag, .HtmlTree, .Text

Class to generate file for each package contents in the right-hand frame. This will list all the Class Kinds in the package. A click on any class-kind will update the frame with the clicked class-kind page.

Field Summary

Modifier and TypeField and Description
private SortedSet<TypeElement>
private final BodyContents
private static final int
private static final int
protected PackageElement
packageElement

The package being documented.

private List<PackageElement>
private final HtmlTree
section

The HTML element for the section tag being written.

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

Constructor Summary

AccessConstructor and Description
public
PackageWriter(HtmlConfiguration
the configuration of the doclet.
configuration
,
PackageElement
PackageElement under consideration.
packageElement
)

Constructor to construct PackageWriter object and to generate "package-summary.html" file in the respective package directory.

Method Summary

Modifier and TypeMethod and Description
public void
addAllClassesAndInterfacesSummary(Content
the content to which the links will be added
target
)

Add all types to the content.

public void
addDeprecationInfo(Content
the content to which the deprecation information will be added
div
)

Add the package deprecation information to the documentation tree.

protected void
addPackageContent(Content packageContent)

protected void
protected void
protected void
addPackageSignature(Content packageContent)

protected void
addPackageTags(Content packageContent)

protected void
protected void
addRelatedPackageSummary(TableHeader tableHeader, Content summaryContent, boolean showModules)

protected void
buildAllClassesAndInterfacesSummary(Content
the list of summaries to which the summary will be added
summariesList
)

Builds the summary for all classes and interfaces in this package.

protected void
buildContent()

Build the content for the package.

protected void
buildPackageDescription(Content
the content to which the package description will be added
packageContent
)

Build the description of the summary.

protected void
buildPackageDoc()

Build the package documentation.

protected void
buildPackageTags(Content
the content to which the package tags will be added
packageContent
)

Build the tags of the summary.

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.

protected void
buildRelatedPackagesSummary(Content
the list of summaries to which the summary will be added
summariesList
)

Builds a list of "nearby" packages (subpackages, superpackages, and sibling packages).

protected void
buildSummary(Content
the package content to which the summaries will be added
packageContent
)

Builds the list of summaries for the different kinds of types in this package.

private void
private SortedSet<TypeElement>
private List<PackageElement>
private List<PackageElement>
protected Content
protected Content
protected Content
getPackageSummary(Content summaryContent)

protected Content
private boolean
public boolean
isIndexable()

Overrides jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.isIndexable.

Returns true if the page written by this writer should be indexed, false otherwise.

protected void
Inherited from jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter:
addInlineCommentaddInlineCommentaddInlineDeprecatedCommentaddPreQualifiedClassLinkaddPreQualifiedClassLinkaddPreQualifiedStrongClassLinkaddPreviewCommentaddPreviewInfoaddPreviewSummaryaddRestrictedInfoaddRestrictedSummaryaddSrcLinkaddSummaryCommentaddSummaryCommentaddSummaryDeprecatedCommentaddTagsInfocommentTagsToContentcommentTagsToContentcommentTagsToContentcreateTableOfContentsgetAnnotationInfogetAnnotationInfogetAnnotationsgetBlockTagOutputgetBlockTagOutputgetBodygetBodyStylegetCrossClassLinkgetCrossModuleLinkgetCrossPackageLinkgetCurrentTypeElementgetDeprecatedPhrasegetDescriptiongetDocLinkgetDocLinkgetDocLinkgetDocLinkgetDocLinkgetEnclosingPackageNamegetFileTitlegetFootergetGeneratorgetHeadergetHeadergetLinkgetLocalizedPackageNamegetLocalStylesheetsgetModuleLinkgetModuleLinkgetNavBargetNavLinkToOverviewTreegetPackageLabelgetPackageLinkgetPackageLinkgetPackageTableHeadergetPreQualifiedClassLinkgetQualifiedClassLinkgetTagletWriterInstancegetTagletWriterInstancegetTypeParameterLinksgetWindowTitlehasSerializationOverviewTagsignoreNonInlineTaginvalidTagOutputpathStringpathStringprintHtmlDocumentprintHtmlDocumentprintHtmlDocumentreplaceDocRootDirresolveExternalSpecURIwriteGenerating

Field Detail

allClassesback to summary
private SortedSet<TypeElement> allClasses
bodyContentsback to summary
private final BodyContents bodyContents
MAX_SIBLING_PACKAGESback to summary
private static final int MAX_SIBLING_PACKAGES
MAX_SUBPACKAGESback to summary
private static final int MAX_SUBPACKAGES
packageElementback to summary
protected PackageElement packageElement

The package being documented.

relatedPackagesback to summary
private List<PackageElement> relatedPackages
sectionback to summary
private final HtmlTree section

The HTML element for the section tag being written.

Constructor Detail

PackageWriterback to summary
public PackageWriter(HtmlConfiguration configuration, PackageElement packageElement)

Constructor to construct PackageWriter object and to generate "package-summary.html" file in the respective package directory. For example for package "java.lang" this will generate file "package-summary.html" file in the "java/lang" directory. It will also create "java/lang" directory in the current or the destination directory if it doesn't exist.

Parameters
configuration:HtmlConfiguration

the configuration of the doclet.

packageElement:PackageElement

PackageElement under consideration.

Method Detail

addAllClassesAndInterfacesSummaryback to summary
public void addAllClassesAndInterfacesSummary(Content target)

Add all types to the content.

Parameters
target:Content

the content to which the links will be added

addDeprecationInfoback to summary
public void addDeprecationInfo(Content div)

Add the package deprecation information to the documentation tree.

Parameters
div:Content

the content to which the deprecation information will be added

addPackageContentback to summary
protected void addPackageContent(Content packageContent)
addPackageDescriptionback to summary
protected void addPackageDescription(Content packageContent)
addPackageFooterback to summary
protected void addPackageFooter()
addPackageSignatureback to summary
protected void addPackageSignature(Content packageContent)
addPackageTagsback to summary
protected void addPackageTags(Content packageContent)
addRelatedPackagesSummaryback to summary
protected void addRelatedPackagesSummary(Content summaryContent)
addRelatedPackageSummaryback to summary
protected void addRelatedPackageSummary(TableHeader tableHeader, Content summaryContent, boolean showModules)
buildAllClassesAndInterfacesSummaryback to summary
protected void buildAllClassesAndInterfacesSummary(Content summariesList)

Builds the summary for all classes and interfaces in this package.

Parameters
summariesList:Content

the list of summaries to which the summary will be added

buildContentback to summary
protected void buildContent()

Build the content for the package.

buildPackageDescriptionback to summary
protected void buildPackageDescription(Content packageContent)

Build the description of the summary.

Parameters
packageContent:Content

the content to which the package description will be added

buildPackageDocback to summary
protected void buildPackageDoc() throws DocletException

Build the package documentation.

Exceptions
DocletException:
if there is a problem while building the documentation
buildPackageTagsback to summary
protected void buildPackageTags(Content packageContent)

Build the tags of the summary.

Parameters
packageContent:Content

the content to which the package tags 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
buildRelatedPackagesSummaryback to summary
protected void buildRelatedPackagesSummary(Content summariesList)

Builds a list of "nearby" packages (subpackages, superpackages, and sibling packages).

Parameters
summariesList:Content

the list of summaries to which the summary will be added

buildSummaryback to summary
protected void buildSummary(Content packageContent)

Builds the list of summaries for the different kinds of types in this package.

Parameters
packageContent:Content

the package content to which the summaries will be added

computePackageDataback to summary
private void computePackageData()
filterClassesback to summary
private SortedSet<TypeElement> filterClasses(SortedSet<TypeElement> types)
filterPackagesback to summary
private List<PackageElement> filterPackages(Predicate<? super PackageElement> filter)
findRelatedPackagesback to summary
private List<PackageElement> findRelatedPackages()
getContentHeaderback to summary
protected Content getContentHeader()
getPackageHeaderback to summary
protected Content getPackageHeader()
getPackageSummaryback to summary
protected Content getPackageSummary(Content summaryContent)
getSummariesListback to summary
protected Content getSummariesList()
hasRelatedPackagesInOtherModulesback to summary
private boolean hasRelatedPackagesInOtherModules(List<PackageElement> relatedPackages)
isIndexableback to summary
public boolean isIndexable()

Overrides jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.isIndexable.

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

Returns true if the page written by this writer should be indexed, false otherwise. Some pages merely aggregate filtered information available on other pages and, thus, have no indexing value. In fact, if indexed, they would clutter the index and mislead the reader.

Annotations
@Override
printDocumentback to summary
protected void printDocument(Content content) throws DocFileIOException