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

public Class ClassWriter

extends SubWriterHolderWriter
Class Inheritance
Imports
java.util.Collection, .List, .Set, .SortedSet, .TreeSet, java.util.stream.Collectors, javax.lang.model.element.Element, .ExecutableElement, .Name, .PackageElement, .TypeElement, .TypeParameterElement, .VariableElement, javax.lang.model.type.TypeMirror, javax.lang.model.util.SimpleElementVisitor8, com.sun.source.doctree.DeprecatedTree, .DocTree, jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode, jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles, jdk.javadoc.internal.doclets.toolkit.CommentUtils, .DocletException, .PropertyUtils, jdk.javadoc.internal.doclets.toolkit.util.ClassTree, .CommentHelper, .DocFileIOException, .DocPath, jdk.javadoc.internal.html.Content, .ContentBuilder, .HtmlAttr, .HtmlTree, .Text

Generate the Class Information Page.
See Also
javax.lang.model.element.TypeElement

Field Summary

Modifier and TypeField and Description
protected final ClassTree
protected static final int
protected final PropertyUtils.PropertyHelper
private static final Set<String>
private static final Set<String>
protected final TypeElement
Inherited from jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter:
bodyContents

Constructor Summary

AccessConstructor and Description
public
ClassWriter(HtmlConfiguration
the configuration data for the doclet
configuration
,
TypeElement
the class being documented.
typeElement
,
ClassTree
the class tree for the given class.
classTree
)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
protected void
private void
protected void
protected void
protected void
protected void
buildClassDescription(Content
the content to which the documentation will be added
target
)

Build the class description.

protected void
buildClassDoc()

Handles the <TypeElement> tag.

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

Build the class information documentation.

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

Build the signature of the current class.

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

Build the tag information for the current class.

protected void
buildClassTree(Content
the content to which the documentation will be added
classContent
)

Build the class inheritance tree documentation.

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

If this class is deprecated, build the appropriate information.

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

If this is a functional interface, display appropriate message.

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

If this is a class, list all interfaces implemented by this class.

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

If this is an interface, list all classes that implement this interface.

protected void
buildMemberDetails(Content
the content to which the documentation will be added
classContent
)

Build the member details contents of the page.

protected void
buildMemberSummary(Content
the content to which the documentation will be added
classContent
)

Build the member summary contents of the page.

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

If this is an inner class or interface, list the enclosing class or interface.

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
buildParamInfo(Content
the content to which the documentation will be added
target
)

Build the type parameters and state components of this class.

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

List all the classes that extend this one.

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

List all the interfaces that extend this one.

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

If this is an interface, list all superinterfaces.

private void
copyDocFiles()

Copy the doc files.

protected Content
private Content

Returns:

the class helper
getClassHelperContent
(TypeMirror
the class to get the helper for
type
)

Get the class helper for the given class.

protected Content
getClassInfo(Content classInfo)

private Content

Returns:

the class inheritance tree
getClassInheritanceTreeContent
(TypeMirror
the class to get the inheritance tree for
type
)

Get the class inheritance tree for the given class.

public TypeElement
getCurrentTypeElement()

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

Returns the type element documented by this writer if it is a ClassWriter, or null for any other kind of writer.

protected Content
getHeader(String header)

protected Content
public PropertyUtils.PropertyHelper
public TypeElement

Returns:

the TypeElement being documented.
getTypeElement
()

Return the TypeElement being documented.

private Content
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
private void
setEnumDocumentation(TypeElement
the enum element
elem
)

The documentation for values() and valueOf() in Enums are set by the doclet only iff the user or overridden methods are missing.

private void
setRecordDocumentation(TypeElement
the record element
elem
)

Sets the documentation as needed for the mandated parts of a record type.

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

Field Detail

classTreeback to summary
protected final ClassTree classTree
LONG_TYPE_PARAMback to summary
protected static final int LONG_TYPE_PARAM
pHelperback to summary
protected final PropertyUtils.PropertyHelper pHelper
suppressImplementingSetback to summary
private static final Set<String> suppressImplementingSet
suppressSubtypesSetback to summary
private static final Set<String> suppressSubtypesSet
typeElementback to summary
protected final TypeElement typeElement

Constructor Detail

ClassWriterback to summary
public ClassWriter(HtmlConfiguration configuration, TypeElement typeElement, ClassTree classTree)
Parameters
configuration:HtmlConfiguration

the configuration data for the doclet

typeElement:TypeElement

the class being documented.

classTree:ClassTree

the class tree for the given class.

Method Detail

addClassDeprecationInfoback to summary
protected void addClassDeprecationInfo(Content classInfo)
addClassDescriptionback to summary
protected void addClassDescription(Content classInfo)
addClassSignatureback to summary
protected void addClassSignature(Content classInfo)
addClassTagInfoback to summary
protected void addClassTagInfo(Content classInfo)
addClassTreeback to summary
protected void addClassTree(Content target)
addFooterback to summary
protected void addFooter()
addFunctionalInterfaceInfoback to summary
protected void addFunctionalInterfaceInfo(Content target)
addImplementedInterfacesInfoback to summary
protected void addImplementedInterfacesInfo(Content target)
addInterfaceUsageInfoback to summary
protected void addInterfaceUsageInfo(Content target)
addNestedClassInfoback to summary
protected void addNestedClassInfo(final Content target)
addParamInfoback to summary
protected void addParamInfo(Content target)
addPreviewInfoback to summary
private void addPreviewInfo(Content content)
addSubClassInfoback to summary
protected void addSubClassInfo(Content target)
addSubInterfacesInfoback to summary
protected void addSubInterfacesInfo(Content target)
addSuperInterfacesInfoback to summary
protected void addSuperInterfacesInfo(Content target)
buildClassDescriptionback to summary
protected void buildClassDescription(Content target)

Build the class description.

Parameters
target:Content

the content to which the documentation will be added

buildClassDocback to summary
protected void buildClassDoc() throws DocletException

Handles the <TypeElement> tag.

Exceptions
DocletException:
if there is a problem while building the documentation
buildClassInfoback to summary
protected void buildClassInfo(Content target)

Build the class information documentation.

Parameters
target:Content

the content to which the documentation will be added

buildClassSignatureback to summary
protected void buildClassSignature(Content target)

Build the signature of the current class.

Parameters
target:Content

the content to which the documentation will be added

buildClassTagInfoback to summary
protected void buildClassTagInfo(Content target)

Build the tag information for the current class.

Parameters
target:Content

the content to which the documentation will be added

buildClassTreeback to summary
protected void buildClassTree(Content classContent)

Build the class inheritance tree documentation.

Parameters
classContent:Content

the content to which the documentation will be added

buildDeprecationInfoback to summary
protected void buildDeprecationInfo(Content target)

If this class is deprecated, build the appropriate information.

Parameters
target:Content

the content to which the documentation will be added

buildFunctionalInterfaceInfoback to summary
protected void buildFunctionalInterfaceInfo(Content target)

If this is a functional interface, display appropriate message.

Parameters
target:Content

the content to which the documentation will be added

buildImplementedInterfacesInfoback to summary
protected void buildImplementedInterfacesInfo(Content target)

If this is a class, list all interfaces implemented by this class.

Parameters
target:Content

the content to which the documentation will be added

buildInterfaceUsageInfoback to summary
protected void buildInterfaceUsageInfo(Content target)

If this is an interface, list all classes that implement this interface.

Parameters
target:Content

the content to which the documentation will be added

buildMemberDetailsback to summary
protected void buildMemberDetails(Content classContent)

Build the member details contents of the page.

Parameters
classContent:Content

the content to which the documentation will be added

buildMemberSummaryback to summary
protected void buildMemberSummary(Content classContent)

Build the member summary contents of the page.

Parameters
classContent:Content

the content to which the documentation will be added

buildNestedClassInfoback to summary
protected void buildNestedClassInfo(Content target)

If this is an inner class or interface, list the enclosing class or interface.

Parameters
target:Content

the content to which the documentation 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
buildParamInfoback to summary
protected void buildParamInfo(Content target)

Build the type parameters and state components of this class.

Parameters
target:Content

the content to which the documentation will be added

buildSubClassInfoback to summary
protected void buildSubClassInfo(Content target)

List all the classes that extend this one.

Parameters
target:Content

the content to which the documentation will be added

buildSubInterfacesInfoback to summary
protected void buildSubInterfacesInfo(Content target)

List all the interfaces that extend this one.

Parameters
target:Content

the content to which the documentation will be added

buildSuperInterfacesInfoback to summary
protected void buildSuperInterfacesInfo(Content target)

If this is an interface, list all superinterfaces.

Parameters
target:Content

the content to which the documentation will be added

copyDocFilesback to summary
private void copyDocFiles() throws DocletException

Copy the doc files.

Exceptions
DocFileIOException:
if there is a problem while copying the files
getClassContentHeaderback to summary
protected Content getClassContentHeader()
getClassHelperContentback to summary
private Content getClassHelperContent(TypeMirror type)

Get the class helper for the given class.

Parameters
type:TypeMirror

the class to get the helper for

Returns:Content

the class helper

getClassInfoback to summary
protected Content getClassInfo(Content classInfo)
getClassInheritanceTreeContentback to summary
private Content getClassInheritanceTreeContent(TypeMirror type)

Get the class inheritance tree for the given class.

Parameters
type:TypeMirror

the class to get the inheritance tree for

Returns:Content

the class inheritance tree

getCurrentTypeElementback to summary
public TypeElement getCurrentTypeElement()

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

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

Returns the type element documented by this writer if it is a ClassWriter, or null for any other kind of writer.

Annotations
@Override
getHeaderback to summary
protected Content getHeader(String header)
getMemberDetailsback to summary
protected Content getMemberDetails(Content content)
getPropertyHelperback to summary
public PropertyUtils.PropertyHelper getPropertyHelper()

Overrides jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter.getPropertyHelper.

Annotations
@Override
getTypeElementback to summary
public TypeElement getTypeElement()

Return the TypeElement being documented.

Returns:TypeElement

the TypeElement being documented.

getTypeParametersback to summary
private Content getTypeParameters()
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
setEnumDocumentationback to summary
private void setEnumDocumentation(TypeElement elem)

The documentation for values() and valueOf() in Enums are set by the doclet only iff the user or overridden methods are missing.

Parameters
elem:TypeElement

the enum element

setRecordDocumentationback to summary
private void setRecordDocumentation(TypeElement elem)

Sets the documentation as needed for the mandated parts of a record type. This includes the canonical constructor, methods like equals, hashCode, toString, the accessor methods, and the underlying field.

Parameters
elem:TypeElement

the record element