Class JdkDoclet

java.lang.Object
uk.ac.starlink.ttools.build.JdkDoclet
All Implemented Interfaces:
jdk.javadoc.doclet.Doclet
Direct Known Subclasses:
JdkDoclet.Html, JdkDoclet.Xml

public abstract class JdkDoclet extends Object implements jdk.javadoc.doclet.Doclet
Doclet for documenting user-visible JEL library classes, based on the jdk.javadoc.doclet API.

Two concrete implementations are provided as inner classes, using different DocletOutput backends.

The jdk.javadoc.doclet API is available only at Java 9 and later, so this class will not compile at earlier JDK versions.

Since:
27 Jan 2023
Author:
Mark Taylor
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Class for use with javadoc tool that writes MethodBrowser-friendly HTML output.
    static class 
    Class for use with javadoc tool that writes SUN-friendly XML output.

    Nested classes/interfaces inherited from interface jdk.javadoc.doclet.Doclet

    jdk.javadoc.doclet.Doclet.Option
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract DocletOutput
    Must provide a format-specific output backend.
     
     
    void
    init(Locale locale, jdk.javadoc.doclet.Reporter reporter)
     
    boolean
    run(jdk.javadoc.doclet.DocletEnvironment env)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jdk.javadoc.doclet.Doclet

    getSupportedOptions
  • Constructor Details

    • JdkDoclet

      protected JdkDoclet(String name)
      Constructor.
      Parameters:
      name - doclet name
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface jdk.javadoc.doclet.Doclet
    • getSupportedSourceVersion

      public SourceVersion getSupportedSourceVersion()
      Specified by:
      getSupportedSourceVersion in interface jdk.javadoc.doclet.Doclet
    • init

      public void init(Locale locale, jdk.javadoc.doclet.Reporter reporter)
      Specified by:
      init in interface jdk.javadoc.doclet.Doclet
    • createOutput

      protected abstract DocletOutput createOutput() throws IOException
      Must provide a format-specific output backend. Called during the doclet run(jdk.javadoc.doclet.DocletEnvironment) method, after option configuration.
      Returns:
      output instance
      Throws:
      IOException
    • run

      public boolean run(jdk.javadoc.doclet.DocletEnvironment env)
      Specified by:
      run in interface jdk.javadoc.doclet.Doclet