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

public abstract Class BaseConfiguration

extends Object
Class Inheritance
Known Direct Subclasses
jdk.javadoc.internal.doclets.formats.html.HtmlConfiguration
Imports
java.util.ArrayList, .Collections, .HashMap, .HashSet, .LinkedHashSet, .List, .Locale, .Map, .Set, .SortedMap, .SortedSet, .TreeMap, .TreeSet, java.util.function.Function, javax.lang.model.SourceVersion, javax.lang.model.element.Element, .ModuleElement, .PackageElement, .TypeElement, javax.lang.model.util.Elements, .SimpleElementVisitor14, javax.tools.JavaFileManager, .JavaFileObject, com.sun.source.tree.CompilationUnitTree, com.sun.source.util.TreePath, com.sun.tools.javac.util.DefinedBy, .DefinedBy.Api, jdk.javadoc.doclet.Doclet, .DocletEnvironment, .Reporter, .StandardDoclet, .Taglet, jdk.javadoc.internal.doclets.toolkit.util.Comparators, .DocFile, .DocFileFactory, .Extern, .Group, .MetaKeywords, .SimpleDocletException, .TypeElementCatalog, .Utils, .Utils.Pair, .VisibleMemberCache, .VisibleMemberTable, jdk.javadoc.internal.doclint.DocLint, jdk.javadoc.internal.tool.AccessLevel

Configure the output based on the options. Doclets should subclass BaseConfiguration, to configure and add their own options. This class contains all user options which are supported by the standard doclet.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public CommentUtils
public DocletEnvironment
docEnv

The doclet environment.

public DocFileFactory
public final Doclet
doclet

The doclet that created this configuration.

protected DocLint
public Extern
extern

The tracker of external package links.

public final Group
group

The package grouping instance.

private Set<ModuleElement>
private Set<PackageElement>
private Set<TypeElement>
private boolean
public final Locale
public MetaKeywords
metakeywords

The meta tag keywords instance.

public SortedMap<ModuleElement, Set<PackageElement>>
modulePackages

A sorted map, giving the (specified|included|other) packages for each module.

public SortedSet<ModuleElement>
modules

The list of known modules, that should be documented.

public OverviewElement
public SortedSet<PackageElement>
packages

A sorted set of included packages.

public PropertyUtils
public final Reporter
protected static final String
pack-priv Map<CompilationUnitTree, Boolean>
public boolean
showModules

Generate modules documentation if more than one module is present.

public String
sourcepath

Sourcepath from where to read the source files.

private Set<ModuleElement>
private Set<PackageElement>
private Set<TypeElement>
public TypeElementCatalog
typeElementCatalog

The catalog of classes specified on the command-line

public Utils
utils

An utility class for commonly used helpers

private VisibleMemberCache
public WorkArounds
workArounds

All the temporary accessors to javac internals.

Constructor Summary

AccessConstructor and Description
public
BaseConfiguration(Doclet
the doclet for this run of javadoc
doclet
,
Locale
the locale for the generated documentation
locale
,
Reporter
the reporter to use for console messages
reporter
)

Constructs the format-independent configuration needed by the doclet.

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

true if successful and false otherwise
finishOptionSettings
()

This method should be defined in all those doclets (configurations), which want to derive themselves from this BaseConfiguration.

protected boolean
public String

Returns:

the class name
getClassName
(TypeElement
the TypeElement to check.
te
)

Return the qualified name of the Element if its qualifier is not excluded.

public abstract Runtime.Version

Returns:

the version
getDocletVersion
()

Returns the version of the doclet.

public abstract Resources
public abstract JavaFileManager

Returns:

JavaFileManager
getFileManager
()

Return the current file manager.

public Set<ModuleElement>
public Set<PackageElement>
public Set<TypeElement>
public abstract Locale

Returns:

the current locale
getLocale
()

Return the Locale for this document.

public abstract Messages
public abstract BaseOptions
public abstract JavaFileObject

Returns:

the path of the overview file.
getOverviewPath
()

Return the path of the overview file and null if it does not exist.

public Reporter
public Set<ModuleElement>
public Set<PackageElement>
public Set<TypeElement>
public VisibleMemberTable
protected void
private void
public void
initDocLint(List<String>
options for DocLint, derived from the corresponding doclet command-line options
opts
,
Set<String>
the names of custom tags, to be ignored by doclint
customTagNames
)

Initializes DocLint, if appropriate, depending on options derived from the doclet command-line options, and the set of custom tags that should be ignored by DocLint.

private void
private void
public boolean

Returns:

the allowScriptInComments
isAllowScriptInComments
()

Returns whether or not to allow JavaScript in comments.

private boolean
public boolean
public boolean
public boolean

Returns:

true if it is a generated doc.
isGeneratedDoc
(TypeElement
the TypeElement for which the page generation is checked
te
)

Return true if the TypeElement element is getting documented, depending upon -nodeprecated option and the deprecation information.

public boolean

Returns:

true if JavaFX is available
isJavaFXMode
()

Determines if JavaFX is available in the compilation environment.

public void
public boolean

Returns:

true if the options are set successfully
setOptions
()

Set the command-line options supported by this configuration.

public boolean

Returns:

true if the directory is excluded.
shouldExcludeDocFileDir
(String
the doc-files subdirectory to check.
docfilesubdir
)

Return true if the given doc-file subdirectory should be excluded and false otherwise.

public boolean

Returns:

true if the qualifier should be excluded
shouldExcludeQualifier
(String
the qualifier to check.
qualifier
)

Return true if the given qualifier should be excluded and false otherwise.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cmtUtilsback to summary
public CommentUtils cmtUtils
docEnvback to summary
public DocletEnvironment docEnv

The doclet environment.

docFileFactoryback to summary
public DocFileFactory docFileFactory
docletback to summary
public final Doclet doclet

The doclet that created this configuration.

doclintback to summary
protected DocLint doclint
externback to summary
public Extern extern

The tracker of external package links.

groupback to summary
public final Group group

The package grouping instance.

includedModuleElementsback to summary
private Set<ModuleElement> includedModuleElements
includedPackageElementsback to summary
private Set<PackageElement> includedPackageElements
includedTypeElementsback to summary
private Set<TypeElement> includedTypeElements
initializedback to summary
private boolean initialized
localeback to summary
public final Locale locale
metakeywordsback to summary
public MetaKeywords metakeywords

The meta tag keywords instance.

modulePackagesback to summary
public SortedMap<ModuleElement, Set<PackageElement>> modulePackages

A sorted map, giving the (specified|included|other) packages for each module.

modulesback to summary
public SortedSet<ModuleElement> modules

The list of known modules, that should be documented.

overviewElementback to summary
public OverviewElement overviewElement
packagesback to summary
public SortedSet<PackageElement> packages

A sorted set of included packages.

propertyUtilsback to summary
public PropertyUtils propertyUtils
reporterback to summary
public final Reporter reporter
sharedResourceBundleNameback to summary
protected static final String sharedResourceBundleName
shouldCheckback to summary
pack-priv Map<CompilationUnitTree, Boolean> shouldCheck
showModulesback to summary
public boolean showModules

Generate modules documentation if more than one module is present.

sourcepathback to summary
public String sourcepath

Sourcepath from where to read the source files. Default is classpath.

specifiedModuleElementsback to summary
private Set<ModuleElement> specifiedModuleElements
specifiedPackageElementsback to summary
private Set<PackageElement> specifiedPackageElements
specifiedTypeElementsback to summary
private Set<TypeElement> specifiedTypeElements
typeElementCatalogback to summary
public TypeElementCatalog typeElementCatalog

The catalog of classes specified on the command-line

utilsback to summary
public Utils utils

An utility class for commonly used helpers

visibleMemberCacheback to summary
private VisibleMemberCache visibleMemberCache
workAroundsback to summary
public WorkArounds workArounds

All the temporary accessors to javac internals.

Constructor Detail

BaseConfigurationback to summary
public BaseConfiguration(Doclet doclet, Locale locale, Reporter reporter)

Constructs the format-independent configuration needed by the doclet.

API Note

The doclet parameter is used when initializing tags. Some doclets (such as the StandardDoclet), may delegate to another (such as the HtmlDoclet). In such cases, the primary doclet (i.e StandardDoclet) should be provided here, and not any internal class like HtmlDoclet.

Parameters
doclet:Doclet

the doclet for this run of javadoc

locale:Locale

the locale for the generated documentation

reporter:Reporter

the reporter to use for console messages

Method Detail

finishOptionSettingsback to summary
public abstract boolean finishOptionSettings()

This method should be defined in all those doclets (configurations), which want to derive themselves from this BaseConfiguration. This method can be used to finish up the options setup.

Returns:boolean

true if successful and false otherwise

finishOptionSettings0back to summary
protected boolean finishOptionSettings0() throws DocletException
getClassNameback to summary
public String getClassName(TypeElement te)

Return the qualified name of the Element if its qualifier is not excluded. Otherwise return the unqualified Element name.

Parameters
te:TypeElement

the TypeElement to check.

Returns:String

the class name

getDocletVersionback to summary
public abstract Runtime.Version getDocletVersion()

Returns the version of the doclet.

Returns:Runtime.Version

the version

getDocResourcesback to summary
public abstract Resources getDocResources()
getFileManagerback to summary
public abstract JavaFileManager getFileManager()

Return the current file manager.

Returns:JavaFileManager

JavaFileManager

getIncludedModuleElementsback to summary
public Set<ModuleElement> getIncludedModuleElements()
getIncludedPackageElementsback to summary
public Set<PackageElement> getIncludedPackageElements()
getIncludedTypeElementsback to summary
public Set<TypeElement> getIncludedTypeElements()
getLocaleback to summary
public abstract Locale getLocale()

Return the Locale for this document.

Returns:Locale

the current locale

getMessagesback to summary
public abstract Messages getMessages()
getOptionsback to summary
public abstract BaseOptions getOptions()
getOverviewPathback to summary
public abstract JavaFileObject getOverviewPath()

Return the path of the overview file and null if it does not exist.

Returns:JavaFileObject

the path of the overview file.

getReporterback to summary
public Reporter getReporter()
getSpecifiedModuleElementsback to summary
public Set<ModuleElement> getSpecifiedModuleElements()
getSpecifiedPackageElementsback to summary
public Set<PackageElement> getSpecifiedPackageElements()
getSpecifiedTypeElementsback to summary
public Set<TypeElement> getSpecifiedTypeElements()
getVisibleMemberTableback to summary
public VisibleMemberTable getVisibleMemberTable(TypeElement te)
initConfigurationback to summary
protected void initConfiguration(DocletEnvironment docEnv, Function<String, String> resourceKeyMapper)
initDestDirectoryback to summary
private void initDestDirectory() throws DocletException
initDocLintback to summary
public void initDocLint(List<String> opts, Set<String> customTagNames)

Initializes DocLint, if appropriate, depending on options derived from the doclet command-line options, and the set of custom tags that should be ignored by DocLint. DocLint is not enabled if the option -Xmsgs:none is given, and it is not followed by any options to enable any groups. Note that arguments for -Xmsgs: can be given individually in separate -Xmsgs: options, or in a comma-separated list for a single option. For example, the following are equivalent:

  • -Xmsgs:all -Xmsgs:-html
  • -Xmsgs:all,-html
Parameters
opts:List<String>

options for DocLint, derived from the corresponding doclet command-line options

customTagNames:Set<String>

the names of custom tags, to be ignored by doclint

initModulesback to summary
private void initModules()
initPackagesback to summary
private void initPackages()
isAllowScriptInCommentsback to summary
public boolean isAllowScriptInComments()

Returns whether or not to allow JavaScript in comments. Default is off; can be set true from a command-line option.

Returns:boolean

the allowScriptInComments

isDocLintGroupEnabledback to summary
private boolean isDocLintGroupEnabled(Messages.Group group)
isDocLintReferenceGroupEnabledback to summary
public boolean isDocLintReferenceGroupEnabled()
isDocLintSyntaxGroupEnabledback to summary
public boolean isDocLintSyntaxGroupEnabled()
isGeneratedDocback to summary
public boolean isGeneratedDoc(TypeElement te)

Return true if the TypeElement element is getting documented, depending upon -nodeprecated option and the deprecation information. Return true if -nodeprecated is not used. Return false if -nodeprecated is used and if either TypeElement element is deprecated or the containing package is deprecated.

Parameters
te:TypeElement

the TypeElement for which the page generation is checked

Returns:boolean

true if it is a generated doc.

isJavaFXModeback to summary
public boolean isJavaFXMode()

Determines if JavaFX is available in the compilation environment.

Returns:boolean

true if JavaFX is available

runDocLintback to summary
public void runDocLint(TreePath path)
setOptionsback to summary
public boolean setOptions() throws DocletException

Set the command-line options supported by this configuration.

Returns:boolean

true if the options are set successfully

Exceptions
DocletException:
if there is a problem while setting the options
shouldExcludeDocFileDirback to summary
public boolean shouldExcludeDocFileDir(String docfilesubdir)

Return true if the given doc-file subdirectory should be excluded and false otherwise.

Parameters
docfilesubdir:String

the doc-files subdirectory to check.

Returns:boolean

true if the directory is excluded.

shouldExcludeQualifierback to summary
public boolean shouldExcludeQualifier(String qualifier)

Return true if the given qualifier should be excluded and false otherwise.

Parameters
qualifier:String

the qualifier to check.

Returns:boolean

true if the qualifier should be excluded

jdk.javadoc.internal.doclets.toolkit back to summary

private Class BaseConfiguration.Splitter

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.javadoc.internal.doclets.toolkit.BaseConfiguration.Splitter

Field Summary

Modifier and TypeField and Description
pack-priv final Set<ModuleElement>
pack-priv final Set<PackageElement>
pack-priv final Set<TypeElement>

Constructor Summary

AccessConstructor and Description
pack-priv
Splitter(DocletEnvironment docEnv, boolean included)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

msetback to summary
pack-priv final Set<ModuleElement> mset
psetback to summary
pack-priv final Set<PackageElement> pset
tsetback to summary
pack-priv final Set<TypeElement> tset

Constructor Detail

Splitterback to summary
pack-priv Splitter(DocletEnvironment docEnv, boolean included)