Class DocletConfig
- All Implemented Interfaces:
Configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCustom directives to include in rendered PlantUML diagram sources.The name of the doclet to delegate main documentation to orOptional.empty()if no delegation is wanted.Destination directory for JavaDoc and UML diagrams, or the empty string""to use the current directory.Names of packages that are excluded as package dependencies.Names of types that are excluded as reference.booleanWhether a detected package dependency cycle must result in an error (instead of a warning).fields()Configuration for generated UML fields.TheHTMLcharacter set is determined the same way theStandarddoclet uses, as we delegate the initial rendering to it: use the"-docencoding"if set, otherwise the source encoding ("-encoding") finally, if no encodings are specified at all, thedefault platform encodingis used as implicit fallback.images()Configuration for generated images.The indentation configuration for generated PlantUML source files.voidlogger()Configured logger for this doclet.mergeOptionsWith(Set<? extends Doclet.Option> standardOptions) methods()Configuration for generated UML methods.The base URL of the PlantUML server to generate diagrams with.booleanWhether PlantUML source files are generated.resolveExternalLinkToType(String packageName, String type) Resolves an external link to the specified type.The UML character set can be explicitly configured with the"-umlEncoding"option.
-
Constructor Details
-
DocletConfig
public DocletConfig()
-
-
Method Details
-
init
-
mergeOptionsWith
-
plantumlServerUrl
Description copied from interface:ConfigurationThe base URL of the PlantUML server to generate diagrams with.Please note that it is not recommended to use the public, central PlantUML server at https://www.plantuml.com/plantuml. Although not strictly forbidden by the author of PlantUML, using the central server to generate your javadoc diagrams is causing additional load on the central server and is a lot slower than running your own local server.
Using docker to run a local PlantUML server can be a simple as:
After that, you can run the UMLDoclet withdocker run -d -p 8080:8080 plantuml/plantuml-server:latestplantumlServerUrl = "http://localhost:8080/"- Specified by:
plantumlServerUrlin interfaceConfiguration- Returns:
- The base URL of the PlantUML online server to use.
-
delegateDocletName
Description copied from interface:ConfigurationThe name of the doclet to delegate main documentation to orOptional.empty()if no delegation is wanted.- Specified by:
delegateDocletNamein interfaceConfiguration- Returns:
- The name of the doclet to delegate main documentation to
or
Optional.empty()if no delegation is wanted.
-
logger
Description copied from interface:ConfigurationConfigured logger for this doclet.This is a simple, custom logging implementation so we do not have to introduce an external dependency.
- Specified by:
loggerin interfaceConfiguration- Returns:
- The logger for this application
-
indentation
Description copied from interface:ConfigurationThe indentation configuration for generated PlantUML source files.- Specified by:
indentationin interfaceConfiguration- Returns:
- The indentation configuration.
-
destinationDirectory
Description copied from interface:ConfigurationDestination directory for JavaDoc and UML diagrams, or the empty string""to use the current directory.- Specified by:
destinationDirectoryin interfaceConfiguration- Returns:
- Destination directory for JavaDoc and UML diagrams, or the empty string
""for the current directory.
-
renderPumlFile
public boolean renderPumlFile()Description copied from interface:ConfigurationWhether PlantUML source files are generated.PlantUML source files have the
.pumlfilename extension.- Specified by:
renderPumlFilein interfaceConfiguration- Returns:
trueif PlantUML source files must be generated, otherwisefalse.
-
images
Description copied from interface:ConfigurationConfiguration for generated images.- Specified by:
imagesin interfaceConfiguration- Returns:
- Configuration for generated images.
-
fields
Description copied from interface:ConfigurationConfiguration for generated UML fields.- Specified by:
fieldsin interfaceConfiguration- Returns:
- UML field configuration.
-
methods
Description copied from interface:ConfigurationConfiguration for generated UML methods.- Specified by:
methodsin interfaceConfiguration- Returns:
- UML method configuration.
-
excludedTypeReferences
Description copied from interface:ConfigurationNames of types that are excluded as reference.Types can be any java type, such as classes and interfaces.
Names should match exactly with the fully quallified type names.
- Specified by:
excludedTypeReferencesin interfaceConfiguration- Returns:
- The types (classes, interfaces) that are excluded as references.
-
excludedPackageDependencies
Description copied from interface:ConfigurationNames of packages that are excluded as package dependencies.The specified package names and any subpackages will be excluded from package dependency diagrams.
- Specified by:
excludedPackageDependenciesin interfaceConfiguration- Returns:
- The packages (including subpackages) excluded from the package dependencies.
-
failOnCyclicPackageDependencies
public boolean failOnCyclicPackageDependencies()Description copied from interface:ConfigurationWhether a detected package dependency cycle must result in an error (instead of a warning).- Specified by:
failOnCyclicPackageDependenciesin interfaceConfiguration- Returns:
trueif a detected package dependency cycle must be considered as an error, orfalseif it should be reported as merely a warning.
-
resolveExternalLinkToType
Description copied from interface:ConfigurationResolves an external link to the specified type.- Specified by:
resolveExternalLinkToTypein interfaceConfiguration- Parameters:
packageName- The package of the type.type- The type name within the package.- Returns:
- The external link, if resolved.
-
customPlantumlDirectives
Description copied from interface:ConfigurationCustom directives to include in rendered PlantUML diagram sources.Custom directives are rendered as-is at the top of each PlantUML diagram. For example, to render handwritten diagrams, use the
"skinparam handwritten true"custom directive.- Specified by:
customPlantumlDirectivesin interfaceConfiguration- Returns:
- Any custom PlantUML directives.
-
umlCharset
Description copied from interface:ConfigurationThe UML character set can be explicitly configured with the"-umlEncoding"option.If this is not explicitly set, the Configuration.htmlCharset() will also be used for the
PlantUMLsource files.This encoding is irrelevant if
Configuration.renderPumlFile()is set tofalse.
Also, diagram files are rendered as binary files, so no explicit encoding is used for them.- Specified by:
umlCharsetin interfaceConfiguration- Returns:
- The charset to use for PlantUML source files (
".puml"files).
-
htmlCharset
Description copied from interface:ConfigurationTheHTMLcharacter set is determined the same way theStandarddoclet uses, as we delegate the initial rendering to it:- use the
"-docencoding"if set, - otherwise the source encoding (
"-encoding") - finally, if no encodings are specified at all,
the
default platform encodingis used as implicit fallback.
- Specified by:
htmlCharsetin interfaceConfiguration- Returns:
- The charset used for Javadoc HTML files.
- use the
-