Module jdk.javadoc

Interface Doclet

All Known Implementing Classes:
StandardDoclet

public interface Doclet
The user doclet must implement this interface, as described in the package description. Each implementation of a Doclet must provide a public no-argument constructor to be used by tools to instantiate the doclet. The tool infrastructure will interact with classes implementing this interface as follows:
  1. The tool will create an instance of a doclet using the no-arg constructor of the doclet class.
  2. Next, the tool calls the init method with an appropriate locale and reporter.
  3. Afterwards, the tool calls getSupportedOptions, and getSupportedSourceVersion. These methods are only called once.
  4. As appropriate, the tool calls the run method on the doclet object, giving it a DocletEnvironment object, from which the doclet can determine the elements to be included in the documentation.

If a doclet object is created and used without the above protocol being followed, then the doclet's behavior is not defined by this interface specification.

To start the doclet, pass -doclet followed by the fully-qualified name of the entry point class (i.e. the implementation of this interface) on the javadoc tool command line.

Since:
9