Class DocletConfig

java.lang.Object
nl.talsmasoftware.umldoclet.javadoc.DocletConfig
All Implemented Interfaces:
Configuration

public class DocletConfig extends Object implements Configuration
  • Constructor Details

    • DocletConfig

      public DocletConfig()
  • Method Details

    • init

      public void init(Locale locale, Reporter reporter)
    • mergeOptionsWith

      public Set<Doclet.Option> mergeOptionsWith(Set<? extends Doclet.Option> standardOptions)
    • plantumlServerUrl

      public Optional<String> plantumlServerUrl()
      Description copied from interface: Configuration
      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:

      
       docker run -d -p 8080:8080 plantuml/plantuml-server:latest
       
      After that, you can run the UMLDoclet with plantumlServerUrl = "http://localhost:8080/"
      Specified by:
      plantumlServerUrl in interface Configuration
      Returns:
      The base URL of the PlantUML online server to use.
    • delegateDocletName

      public Optional<String> delegateDocletName()
      Description copied from interface: Configuration
      The name of the doclet to delegate main documentation to or Optional.empty() if no delegation is wanted.
      Specified by:
      delegateDocletName in interface Configuration
      Returns:
      The name of the doclet to delegate main documentation to or Optional.empty() if no delegation is wanted.
    • logger

      public Logger logger()
      Description copied from interface: Configuration
      Configured logger for this doclet.

      This is a simple, custom logging implementation so we do not have to introduce an external dependency.

      Specified by:
      logger in interface Configuration
      Returns:
      The logger for this application
    • indentation

      public Indentation indentation()
      Description copied from interface: Configuration
      The indentation configuration for generated PlantUML source files.
      Specified by:
      indentation in interface Configuration
      Returns:
      The indentation configuration.
    • destinationDirectory

      public String destinationDirectory()
      Description copied from interface: Configuration
      Destination directory for JavaDoc and UML diagrams, or the empty string "" to use the current directory.
      Specified by:
      destinationDirectory in interface Configuration
      Returns:
      Destination directory for JavaDoc and UML diagrams, or the empty string "" for the current directory.
    • renderPumlFile

      public boolean renderPumlFile()
      Description copied from interface: Configuration
      Whether PlantUML source files are generated.

      PlantUML source files have the .puml filename extension.

      Specified by:
      renderPumlFile in interface Configuration
      Returns:
      true if PlantUML source files must be generated, otherwise false.
    • images

      public ImageConfig images()
      Description copied from interface: Configuration
      Configuration for generated images.
      Specified by:
      images in interface Configuration
      Returns:
      Configuration for generated images.
    • fields

      public FieldConfig fields()
      Description copied from interface: Configuration
      Configuration for generated UML fields.
      Specified by:
      fields in interface Configuration
      Returns:
      UML field configuration.
    • methods

      public MethodConfig methods()
      Description copied from interface: Configuration
      Configuration for generated UML methods.
      Specified by:
      methods in interface Configuration
      Returns:
      UML method configuration.
    • excludedTypeReferences

      public List<String> excludedTypeReferences()
      Description copied from interface: Configuration
      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.

      Specified by:
      excludedTypeReferences in interface Configuration
      Returns:
      The types (classes, interfaces) that are excluded as references.
    • excludedPackageDependencies

      public List<String> excludedPackageDependencies()
      Description copied from interface: Configuration
      Names of packages that are excluded as package dependencies.

      The specified package names and any subpackages will be excluded from package dependency diagrams.

      Specified by:
      excludedPackageDependencies in interface Configuration
      Returns:
      The packages (including subpackages) excluded from the package dependencies.
    • failOnCyclicPackageDependencies

      public boolean failOnCyclicPackageDependencies()
      Description copied from interface: Configuration
      Whether a detected package dependency cycle must result in an error (instead of a warning).
      Specified by:
      failOnCyclicPackageDependencies in interface Configuration
      Returns:
      true if a detected package dependency cycle must be considered as an error, or false if it should be reported as merely a warning.
    • resolveExternalLinkToType

      public Optional<URI> resolveExternalLinkToType(String packageName, String type)
      Description copied from interface: Configuration
      Resolves an external link to the specified type.
      Specified by:
      resolveExternalLinkToType in interface Configuration
      Parameters:
      packageName - The package of the type.
      type - The type name within the package.
      Returns:
      The external link, if resolved.
    • customPlantumlDirectives

      public List<String> customPlantumlDirectives()
      Description copied from interface: Configuration
      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 render handwritten diagrams, use the "skinparam handwritten true" custom directive.

      Specified by:
      customPlantumlDirectives in interface Configuration
      Returns:
      Any custom PlantUML directives.
    • umlCharset

      public Charset umlCharset()
      Description copied from interface: Configuration
      The 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 PlantUML source files.

      This encoding is irrelevant if Configuration.renderPumlFile() is set to false.
      Also, diagram files are rendered as binary files, so no explicit encoding is used for them.

      Specified by:
      umlCharset in interface Configuration
      Returns:
      The charset to use for PlantUML source files (".puml" files).
    • htmlCharset

      public Charset htmlCharset()
      Description copied from interface: Configuration
      The HTML character set is determined the same way the Standard doclet uses, as we delegate the initial rendering to it:
      1. use the "-docencoding" if set,
      2. otherwise the source encoding ("-encoding")
      3. finally, if no encodings are specified at all, the default platform encoding is used as implicit fallback.
      Specified by:
      htmlCharset in interface Configuration
      Returns:
      The charset used for Javadoc HTML files.