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

public Class HtmlDoclet

extends AbstractDoclet
Class Inheritance
Imports
java.io.BufferedReader, .FileNotFoundException, .IOException, .InputStream, .InputStreamReader, java.net.URISyntaxException, .URL, java.nio.file.DirectoryStream, .Files, .InvalidPathException, .Path, java.util.ArrayList, .EnumSet, .HashMap, .List, .Locale, .Map, .Set, .SortedSet, java.util.function.Function, java.util.regex.Matcher, .Pattern, javax.lang.model.SourceVersion, javax.lang.model.element.ModuleElement, .PackageElement, .TypeElement, jdk.javadoc.doclet.Doclet, .DocletEnvironment, .Reporter, jdk.javadoc.internal.doclets.toolkit.AbstractDoclet, .DocletException, .Messages, jdk.javadoc.internal.doclets.toolkit.util.ClassTree, .DeprecatedAPIListBuilder, .DocFile, .DocFileIOException, .DocPath, .DocPaths, .NewAPIBuilder, .PreviewAPIListBuilder, .ResourceIOException, .RestrictedAPIListBuilder

The class with "start" method, calls individual Writers.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static record

Field Summary

Modifier and TypeField and Description
private HtmlConfiguration
configuration

Hides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.configuration.

The global configuration information for this run.
private final Doclet
initiatingDoclet

The initiating doclet, to be specified when creating the configuration.

private Messages
messages

Hides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.messages.

Object for generating messages and diagnostics.
private WriterFactory
writerFactory

Factory for page- and member-writers.

Inherited from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet:
utils

Constructor Summary

AccessConstructor and Description
public
HtmlDoclet(Doclet
the initiating doclet
initiatingDoclet
)

Creates a doclet to generate HTML documentation, specifying the "initiating doclet" to be used when initializing any taglets for this doclet.

Method Summary

Modifier and TypeMethod and Description
private void
copyFile(String filename, DocPath targetPath)

private void
private void
copyLegalFiles(boolean includeJQuery, boolean includeHighlightJs)

private void
copyResource(DocPath sourcePath, DocPath targetPath, boolean replaceNewLine)

private void
public void
generateClassFiles(ClassTree classTree)

Overrides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Iterate through all classes and construct documentation for them.

protected void
generateClassFiles(SortedSet<TypeElement> typeElems, ClassTree classTree)

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Generate the class documentation.

protected void
protected void
protected void
protected void
generatePackageFiles(ClassTree classTree)

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generatePackageFiles.

Generate the package documentation.

public HtmlConfiguration

Returns:

the configuration
getConfiguration
()

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.getConfiguration.

Create the configuration instance.

public String
getName()

Implements jdk.javadoc.doclet.Doclet.getName.

Returns a name identifying the doclet.

protected Function<String, String>
public Set<? extends Doclet.Option>
getSupportedOptions()

Implements jdk.javadoc.doclet.Doclet.getSupportedOptions.

Returns all the supported options.

public void
init(Locale locale, Reporter reporter)

Implements jdk.javadoc.doclet.Doclet.init.

Initializes this doclet with the given locale and error reporter.

private HtmlDoclet.ReadableResource
Inherited from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet:
getSupportedSourceVersionrun

Field Detail

configurationback to summary
private HtmlConfiguration configuration

Hides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.configuration.

The global configuration information for this run. Initialized in init(Locale, Reporter).

initiatingDocletback to summary
private final Doclet initiatingDoclet

The initiating doclet, to be specified when creating the configuration.

messagesback to summary
private Messages messages

Hides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.messages.

Object for generating messages and diagnostics.

writerFactoryback to summary
private WriterFactory writerFactory

Factory for page- and member-writers.

Constructor Detail

HtmlDocletback to summary
public HtmlDoclet(Doclet initiatingDoclet)

Creates a doclet to generate HTML documentation, specifying the "initiating doclet" to be used when initializing any taglets for this doclet. An initiating doclet is one that delegates to this doclet.

Parameters
initiatingDoclet:Doclet

the initiating doclet

Method Detail

copyFileback to summary
private void copyFile(String filename, DocPath targetPath) throws DocFileIOException
copyFontResourcesback to summary
private void copyFontResources() throws DocletException
copyLegalFilesback to summary
private void copyLegalFiles(boolean includeJQuery, boolean includeHighlightJs) throws DocletException
copyResourceback to summary
private void copyResource(DocPath sourcePath, DocPath targetPath, boolean replaceNewLine) throws DocletException
copyStylesheetback to summary
private void copyStylesheet(HtmlOptions options) throws DocletException
generateClassFilesback to summary
public void generateClassFiles(ClassTree classTree) throws DocletException

Overrides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Doc from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Iterate through all classes and construct documentation for them.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while generating the documentation
generateClassFilesback to summary
protected void generateClassFiles(SortedSet<TypeElement> typeElems, ClassTree classTree) throws DocletException

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Doc from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles.

Generate the class documentation.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while generating the documentation
generateFilesback to summary
protected void generateFiles() throws DocletException

Overrides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateFiles.

Doc from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateFiles.

Start the generation of files. Call generate methods in the individual writers, which will in turn generate the documentation files. Call the TreeWriter generation first to ensure the Class Hierarchy is built first and then can be used in the later generation.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while generating the documentation
generateModuleFilesback to summary
protected void generateModuleFiles() throws DocletException

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateModuleFiles.

Doc from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateModuleFiles.

Generate the module documentation.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while generating the documentation
generateOtherFilesback to summary
protected void generateOtherFiles(ClassTree classTree) throws DocletException

Overrides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateOtherFiles.

Start the generation of files. Call generate methods in the individual writers, which will in turn generate the documentation files. Call the TreeWriter generation first to ensure the Class Hierarchy is built first and then can be used in the later generation.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while writing the other files
generatePackageFilesback to summary
protected void generatePackageFiles(ClassTree classTree) throws DocletException

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generatePackageFiles.

Doc from jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generatePackageFiles.

Generate the package documentation.

Annotations
@Override
Exceptions
DocletException:
if there is a problem while generating the documentation
getConfigurationback to summary
public HtmlConfiguration getConfiguration()

Implements abstract jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.getConfiguration.

Create the configuration instance. Override this method to use a different configuration.

Returns:HtmlConfiguration

the configuration

Annotations
@Override
getNameback to summary
public String getName()

Implements jdk.javadoc.doclet.Doclet.getName.

Doc from jdk.javadoc.doclet.Doclet.getName.

Returns a name identifying the doclet. A name is a simple identifier without white spaces, as defined in The Java Language Specification, section 6.2 "Names and Identifiers".

Annotations
@Override
getResourceKeyMapperback to summary
protected Function<String, String> getResourceKeyMapper(DocletEnvironment docEnv)

Overrides jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.getResourceKeyMapper.

Annotations
@Override
getSupportedOptionsback to summary
public Set<? extends Doclet.Option> getSupportedOptions()

Implements jdk.javadoc.doclet.Doclet.getSupportedOptions.

Doc from jdk.javadoc.doclet.Doclet.getSupportedOptions.

Returns all the supported options.

Annotations
@Override
initback to summary
public void init(Locale locale, Reporter reporter)

Implements jdk.javadoc.doclet.Doclet.init.

Doc from jdk.javadoc.doclet.Doclet.init.

Initializes this doclet with the given locale and error reporter. This locale will be used by the reporter and the doclet components.

Annotations
@Override
resolveResourceback to summary
private HtmlDoclet.ReadableResource resolveResource(DocPath sourcePath) throws ResourceIOException
jdk.javadoc.internal.doclets.formats.html back to summary

private final Record HtmlDoclet.ReadableResource

extends Record
Class Inheritance
Record Components
path:DocPath 
url:URL 

Field Summary

Modifier and TypeField and Description
private final DocPath
path

Record Component accessed by path().

private final URL
url

Record Component accessed by url().

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public DocPath
path()

Record Component getter of path.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

public URL
url()

Record Component getter of url.

Field Detail

pathback to summary
private final DocPath path

Record Component accessed by path().

urlback to summary
private final URL url

Record Component accessed by url().

Constructor Detail

ReadableResourceback to summary
private ReadableResource(DocPath path, URL url)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

pathback to summary
public DocPath path()

Record Component getter of path.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.

urlback to summary
public URL url()

Record Component getter of url.