Class UMLDoclet

java.lang.Object
jdk.javadoc.doclet.StandardDoclet
nl.talsmasoftware.umldoclet.UMLDoclet
All Implemented Interfaces:
Doclet

public class UMLDoclet extends StandardDoclet
UML doclet that generates PlantUML class diagrams from your java code just as easily as creating proper JavaDoc comments.
It actually extends JavaDoc's StandardDoclet doclet to generate the regular HTML documentation.
Author:
Sjoerd Talsma
  • Constructor Details

    • UMLDoclet

      public UMLDoclet()
      Default constructor, as required by Doclet specification.
  • Method Details

    • init

      public void init(Locale locale, Reporter reporter)
      Initializes the Locale and Reporter to be used by this doclet.
      Specified by:
      init in interface Doclet
      Overrides:
      init in class StandardDoclet
      Parameters:
      locale - The locale to be used by this doclet.
      reporter - The reporter to be used by this doclet.
    • getName

      public String getName()
      Specified by:
      getName in interface Doclet
      Overrides:
      getName in class StandardDoclet
      Returns:
      The name of this doclet, minus the "Doclet" suffix since the StandardDoclet also returns just "Standard" as its name.
    • getSupportedOptions

      public Set<Doclet.Option> getSupportedOptions()
      Returns all supported options. This includes the options from the StandardDoclet.
      Specified by:
      getSupportedOptions in interface Doclet
      Overrides:
      getSupportedOptions in class StandardDoclet
      Returns:
      The set containing all supported options
    • run

      public boolean run(DocletEnvironment environment)
      Perform the main doclet functionality, processing all included elements.

      For each included class, a ClassDiagram is generated. For each included package, a PackageDiagram is genrated. Also, a DependencyDiagram is generated, containing all dependencies that were detected.

      Depending on the Configuration, diagram images or .puml plantuml source files are generated.

      Specified by:
      run in interface Doclet
      Overrides:
      run in class StandardDoclet
      Parameters:
      environment - The doclet environment from which essential information can be extracted
      Returns:
      true if the doclet ran succesfully, false in case of errors.