Interface Configuration
- All Known Implementing Classes:
DocletConfig
- Author:
- Sjoerd Talsma
-
Method Summary
Modifier and TypeMethodDescriptionCustom directives to include in rendered PlantUML diagram sources.Deprecated, for removal: This API element is subject to removal in a future version.Delegation to another Doclet does not work at te moment unfortunately.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.boolean
Whether a detected package dependency cycle must result in an error (instead of a warning).fields()
Configuration for generated UML fields.TheHTML
character set is determined the same way theStandard
doclet 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 encoding
is used as implicit fallback.images()
Configuration for generated images.The indentation configuration for generated PlantUML source files.logger()
Configured logger for this doclet.methods()
Configuration for generated UML methods.The base URL of the PlantUML server to generate diagrams with.boolean
Whether 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.
-
Method Details
-
plantumlServerUrl
The 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:latest
plantumlServerUrl = "http://localhost:8080/"
- Returns:
- The base URL of the PlantUML online server to use.
-
delegateDocletName
Deprecated, for removal: This API element is subject to removal in a future version.Delegation to another Doclet does not work at te moment unfortunately.The name of the doclet to delegate main documentation to orOptional.empty()
if no delegation is wanted.- Returns:
- The name of the doclet to delegate main documentation to
or
Optional.empty()
if no delegation is wanted.
-
logger
Logger logger()Configured logger for this doclet.This is a simple, custom logging implementation so we do not have to introduce an external dependency.
- Returns:
- The logger for this application
-
indentation
Indentation indentation()The indentation configuration for generated PlantUML source files.- Returns:
- The indentation configuration.
-
destinationDirectory
String destinationDirectory()Destination directory for JavaDoc and UML diagrams, or the empty string""
to use the current directory.- Returns:
- Destination directory for JavaDoc and UML diagrams, or the empty string
""
for the current directory.
-
renderPumlFile
boolean renderPumlFile()Whether PlantUML source files are generated.PlantUML source files have the
.puml
filename extension.- Returns:
true
if PlantUML source files must be generated, otherwisefalse
.
-
images
ImageConfig images()Configuration for generated images.- Returns:
- Configuration for generated images.
-
fields
FieldConfig fields()Configuration for generated UML fields.- Returns:
- UML field configuration.
-
methods
MethodConfig methods()Configuration for generated UML methods.- Returns:
- UML method configuration.
-
excludedTypeReferences
Names 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.
- Returns:
- The types (classes, interfaces) that are excluded as references.
-
excludedPackageDependencies
Names of packages that are excluded as package dependencies.The specified package names and any subpackages will be excluded from package dependency diagrams.
- Returns:
- The packages (including subpackages) excluded from the package dependencies.
-
failOnCyclicPackageDependencies
boolean failOnCyclicPackageDependencies()Whether a detected package dependency cycle must result in an error (instead of a warning).- Returns:
true
if a detected package dependency cycle must be considered as an error, orfalse
if it should be reported as merely a warning.
-
resolveExternalLinkToType
Resolves an external link to the specified type.- Parameters:
packageName
- The package of the type.type
- The type name within the package.- Returns:
- The external link, if resolved.
-
customPlantumlDirectives
Custom directives to include in rendered PlantUML diagram sources.Custom directives are rendered as-is at the top of each PlantUML diagram. For example, to use jdot for rendering, use the
"!pragma graphviz_dot jdot"
custom directive.- Returns:
- Any custom PlantUML directives.
-
umlCharset
Charset umlCharset()The UML character set can be explicitly configured with the"-umlEncoding"
option.If this is not explicitly set, the htmlCharset() will also be used for the
PlantUML
source files.This encoding is irrelevant if
renderPumlFile()
is set tofalse
.
Also, diagram files are rendered as binary files, so no explicit encoding is used for them.- Returns:
- The charset to use for PlantUML source files (
".puml"
files).
-
htmlCharset
Charset htmlCharset()TheHTML
character set is determined the same way theStandard
doclet 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 encoding
is used as implicit fallback.
- Returns:
- The charset used for Javadoc HTML files.
- use the
-