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

public Class SerializedFormWriter

extends SubWriterHolderWriter
Class Inheritance
Imports
java.util.Collection, .List, .Set, .SortedSet, .TreeSet, javax.lang.model.element.Element, .ExecutableElement, .PackageElement, .TypeElement, .VariableElement, javax.lang.model.type.TypeMirror, com.sun.source.doctree.SerialFieldTree, .SerialTree, jdk.javadoc.internal.doclets.formats.html.Navigation.PageMode, jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyles, jdk.javadoc.internal.doclets.toolkit.DocletException, jdk.javadoc.internal.doclets.toolkit.util.CommentHelper, .DocFileIOException, .DocPaths, .IndexItem, .Utils, jdk.javadoc.internal.html.Content, .ContentBuilder, .Entity, .HtmlTree, .Text

Generates the Serialized Form Information Page, serialized-form.html.

Field Summary

Modifier and TypeField and Description
protected Element
currentMember

The current member being documented.

private PackageElement
currentPackage

The current package being documented.

private TypeElement
currentTypeElement

The current class being documented.

private SerialFieldWriter
fieldWriter

The writer for serializable fields.

private SerialMethodWriter
methodWriter

The writer for serializable method documentation.

private static final String
SERIAL_VERSION_UID

The header for the serial version UID.

private static final String
pack-priv Set<TypeElement>
Inherited from jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter:
bodyContents

Constructor Summary

AccessConstructor and Description
public
SerializedFormWriter(HtmlConfiguration
the configuration data for the doclet
configuration
)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addFooter()

Add the footer.

pack-priv void
addPackageSerialized(Content serializedSummaries, Content packageSerialized)

pack-priv void
addSerializedContent(Content
the serialized content to be added
source
)

Add the serialized content section.

pack-priv void
addSerialUIDInfo(String
the header that will show up before the UID.
header
,
String
the serial UID to print.
serialUID
,
Content
the serial UID content to which the serial UID content will be added
target
)

Adds the serial UID info.

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

Build the summaries for the methods and fields.

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

Build the class serialized form.

protected void
buildDeprecatedMethodInfo(Content
the content to which the documentation will be added
methodsContent
)

Build the deprecated method description.

protected void
buildFieldDeprecationInfo(Content
the content to which the documentation will be added
fieldsContent
)

Build the field deprecation information.

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

Build the field header.

protected void
buildFieldInfo(Content
the content to which the documentation will be added
fieldsContent
)

Build the field information.

public void
buildFieldSerializationOverview(TypeElement
the class to print the overview for.
typeElement
,
Content
the content to which the documentation will be added
classContent
)

Build the serialization overview for the given class.

protected void
buildFieldSubHeader(Content
the content to which the documentation will be added
fieldsContent
)

Build the field sub header.

protected void
buildMethodDescription(Content
the content to which the documentation will be added
methodsContent
)

Build method description.

protected void
buildMethodInfo(Content
the content to which the documentation will be added
methodsContent
)

Build the information for the method.

protected void
buildMethodSubHeader(Content
the content to which the documentation will be added
methodsContent
)

Build the method sub header.

protected void
buildMethodTags(Content
the content to which the documentation will be added
methodsContent
)

Build the method tags.

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

Build the package header.

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

Build the package serialized form for the current package being processed.

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

Build the serial field tags information.

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

Build the summaries for the fields that belong to the given class.

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

Build the summaries for the methods that belong to the given class.

protected void
buildSerializedForm()

Build the serialized form.

protected void
buildSerializedFormSummaries()

Build the serialized form summaries.

protected void
buildSerialUIDInfo(Content
the content to which the serial UID information will be added
target
)

Build the serial UID information for the given class.

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

Returns:

the body content
getHeader
(String
the header to write
header
)

Get the given header.

pack-priv Content
pack-priv Content

Returns:

the package serialized form header tree
getPackageSerializedHeader
()

Get the package serialized form header.

pack-priv SerialFieldWriter

Returns:

an instance of a SerialFieldWriter.
getSerialFieldWriter
(TypeElement typeElement)

Return an instance of a SerialFieldWriter.

pack-priv Content

Returns:

the serialized form summaries header
getSerializedSummariesHeader
()

Get the serialized form summaries header.

pack-priv SerialMethodWriter

Returns:

an instance of a SerialMethodWriter.
getSerialMethodWriter
(TypeElement typeElement)

Return an instance of a SerialMethodWriter.

pack-priv Content
public boolean

Returns:

true if the class, that is being processed, is generated and is visible.
isVisibleClass
(TypeElement
the class being processed.
typeElement
)

Checks if a class is generated and is visible.

pack-priv void
private boolean

Returns:

true if any of the given typeElements have a @serial include tag.
serialClassFoundToDocument
(SortedSet<TypeElement>
the typeElements to check.
classes
)

Return true if any of the given typeElements have a @serial include tag.

private static boolean
serialClassInclude(Utils utils, TypeElement
the TypeElement object to check for serializability.
te
)

Returns true if the given TypeElement should be included in the serialized form.

private static boolean
serialDocInclude(Utils utils, Element
the Element to check for serializability.
element
)

Return true if the given Element should be included in the serialized form.

public static boolean

Returns:

true if the element should be included in the serial form
serialInclude
(Utils
the utils object
utils
,
Element
the Element object to check for serializability
element
)

Returns true if the given Element should be included in the serialized form.

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

Field Detail

currentMemberback to summary
protected Element currentMember

The current member being documented.

currentPackageback to summary
private PackageElement currentPackage

The current package being documented.

currentTypeElementback to summary
private TypeElement currentTypeElement

The current class being documented.

fieldWriterback to summary
private SerialFieldWriter fieldWriter

The writer for serializable fields.

methodWriterback to summary
private SerialMethodWriter methodWriter

The writer for serializable method documentation.

SERIAL_VERSION_UIDback to summary
private static final String SERIAL_VERSION_UID

The header for the serial version UID. Save the string here instead of the properties file because we do not want this string to be localized.

SERIAL_VERSION_UID_HEADERback to summary
private static final String SERIAL_VERSION_UID_HEADER
visibleClassesback to summary
pack-priv Set<TypeElement> visibleClasses

Constructor Detail

SerializedFormWriterback to summary
public SerializedFormWriter(HtmlConfiguration configuration)
Parameters
configuration:HtmlConfiguration

the configuration data for the doclet

Method Detail

addFooterback to summary
pack-priv void addFooter()

Add the footer.

addPackageSerializedback to summary
pack-priv void addPackageSerialized(Content serializedSummaries, Content packageSerialized)
addSerializedContentback to summary
pack-priv void addSerializedContent(Content source)

Add the serialized content section.

Parameters
source:Content

the serialized content to be added

addSerialUIDInfoback to summary
pack-priv void addSerialUIDInfo(String header, String serialUID, Content target)

Adds the serial UID info.

Parameters
header:String

the header that will show up before the UID.

serialUID:String

the serial UID to print.

target:Content

the serial UID content to which the serial UID content will be added

buildClassContentback to summary
protected void buildClassContent(Content target)

Build the summaries for the methods and fields.

Parameters
target:Content

the content to which the documentation will be added

buildClassSerializedFormback to summary
protected void buildClassSerializedForm(Content target)

Build the class serialized form.

Parameters
target:Content

the content to which the documentation will be added

buildDeprecatedMethodInfoback to summary
protected void buildDeprecatedMethodInfo(Content methodsContent)

Build the deprecated method description.

Parameters
methodsContent:Content

the content to which the documentation will be added

buildFieldDeprecationInfoback to summary
protected void buildFieldDeprecationInfo(Content fieldsContent)

Build the field deprecation information.

Parameters
fieldsContent:Content

the content to which the documentation will be added

buildFieldHeaderback to summary
protected void buildFieldHeader(Content classContent)

Build the field header.

Parameters
classContent:Content

the content to which the documentation will be added

buildFieldInfoback to summary
protected void buildFieldInfo(Content fieldsContent)

Build the field information.

Parameters
fieldsContent:Content

the content to which the documentation will be added

buildFieldSerializationOverviewback to summary
public void buildFieldSerializationOverview(TypeElement typeElement, Content classContent)

Build the serialization overview for the given class.

Parameters
typeElement:TypeElement

the class to print the overview for.

classContent:Content

the content to which the documentation will be added

buildFieldSubHeaderback to summary
protected void buildFieldSubHeader(Content fieldsContent)

Build the field sub header.

Parameters
fieldsContent:Content

the content to which the documentation will be added

buildMethodDescriptionback to summary
protected void buildMethodDescription(Content methodsContent)

Build method description.

Parameters
methodsContent:Content

the content to which the documentation will be added

buildMethodInfoback to summary
protected void buildMethodInfo(Content methodsContent)

Build the information for the method.

Parameters
methodsContent:Content

the content to which the documentation will be added

buildMethodSubHeaderback to summary
protected void buildMethodSubHeader(Content methodsContent)

Build the method sub header.

Parameters
methodsContent:Content

the content to which the documentation will be added

buildMethodTagsback to summary
protected void buildMethodTags(Content methodsContent)

Build the method tags.

Parameters
methodsContent:Content

the content to which the documentation will be added

buildPackageHeaderback to summary
protected void buildPackageHeader(Content target)

Build the package header.

Parameters
target:Content

the content to which the documentation will be added

buildPackageSerializedFormback to summary
protected void buildPackageSerializedForm(Content target)

Build the package serialized form for the current package being processed.

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
buildSerialFieldTagsInfoback to summary
protected void buildSerialFieldTagsInfo(Content target)

Build the serial field tags information.

Parameters
target:Content

the content to which the documentation will be added

buildSerializableFieldsback to summary
protected void buildSerializableFields(Content target)

Build the summaries for the fields that belong to the given class.

Parameters
target:Content

the content to which the documentation will be added

buildSerializableMethodsback to summary
protected void buildSerializableMethods(Content target)

Build the summaries for the methods that belong to the given class.

Parameters
target:Content

the content to which the documentation will be added

buildSerializedFormback to summary
protected void buildSerializedForm() throws DocletException

Build the serialized form.

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

Build the serialized form summaries.

buildSerialUIDInfoback to summary
protected void buildSerialUIDInfo(Content target)

Build the serial UID information for the given class.

Parameters
target:Content

the content to which the serial UID information will be added

getClassContentHeaderback to summary
pack-priv Content getClassContentHeader()
getClassHeaderback to summary
pack-priv Content getClassHeader(TypeElement typeElement)
getClassSerializedHeaderback to summary
pack-priv Content getClassSerializedHeader()
getHeaderback to summary
pack-priv Content getHeader(String header)

Get the given header.

Parameters
header:String

the header to write

Returns:Content

the body content

getPackageHeaderback to summary
pack-priv Content getPackageHeader(PackageElement packageElement)
getPackageSerializedHeaderback to summary
pack-priv Content getPackageSerializedHeader()

Get the package serialized form header.

Returns:Content

the package serialized form header tree

getSerialFieldWriterback to summary
pack-priv SerialFieldWriter getSerialFieldWriter(TypeElement typeElement)

Return an instance of a SerialFieldWriter.

Returns:SerialFieldWriter

an instance of a SerialFieldWriter.

getSerializedSummariesHeaderback to summary
pack-priv Content getSerializedSummariesHeader()

Get the serialized form summaries header.

Returns:Content

the serialized form summaries header

getSerialMethodWriterback to summary
pack-priv SerialMethodWriter getSerialMethodWriter(TypeElement typeElement)

Return an instance of a SerialMethodWriter.

Returns:SerialMethodWriter

an instance of a SerialMethodWriter.

getSerialUIDInfoHeaderback to summary
pack-priv Content getSerialUIDInfoHeader()
isVisibleClassback to summary
public boolean isVisibleClass(TypeElement typeElement)

Checks if a class is generated and is visible.

Parameters
typeElement:TypeElement

the class being processed.

Returns:boolean

true if the class, that is being processed, is generated and is visible.

printDocumentback to summary
pack-priv void printDocument(Content source) throws DocFileIOException
serialClassFoundToDocumentback to summary
private boolean serialClassFoundToDocument(SortedSet<TypeElement> classes)

Return true if any of the given typeElements have a @serial include tag.

Parameters
classes:SortedSet<TypeElement>

the typeElements to check.

Returns:boolean

true if any of the given typeElements have a @serial include tag.

serialClassIncludeback to summary
private static boolean serialClassInclude(Utils utils, TypeElement te)

Returns true if the given TypeElement should be included in the serialized form.

Parameters
te:TypeElement

the TypeElement object to check for serializability.

serialDocIncludeback to summary
private static boolean serialDocInclude(Utils utils, Element element)

Return true if the given Element should be included in the serialized form.

Parameters
element:Element

the Element to check for serializability.

serialIncludeback to summary
public static boolean serialInclude(Utils utils, Element element)

Returns true if the given Element should be included in the serialized form.

Parameters
utils:Utils

the utils object

element:Element

the Element object to check for serializability

Returns:boolean

true if the element should be included in the serial form