Java

The Standard Doclet

Javadoc 1.2

Contents

What the Standard Doclet Is

The standard doclet is the doclet provided by SunTM that produces Javadoc's default HTML-formatted API output. The API documentation for the JavaTM platform in this JDKTM documentation is an example of the standard doclet's output. Javadoc uses the standard doclet if no other doclet is specified using Javadoc's -doclet option on the command line.

The API documentation produced by the standard doclet has a different format than that produced by the Javadoc tool in the JDK 1.1 software. The output of the standard doclet has also changed during the beta cycle of the JDK 1.2 software. See Changes to Standard Doclet for a summary of these changes and for new requirements for writing documentation comments in source code.

One reason to look at the standard doclet is that it serves as a good example of the use of much of the doclet API. A second reason is that by seeing how the standard doclet produces the default HTML output, it will be easier for you to modify the standard doclet to make your own doclet for generating custom API documentation.

Classes in the Standard Doclet

The standard doclet is comprised of the classes in the com.sun.tools.doclets and com.sun.tools.doclets.standard packages. These packages are not a part of the core API of the Java platform. Classes in the standard doclet that play key roles in generating the default HTML output are summarized here:

Running the Standard Doclet

The standard doclet is invoked by default when no other doclet is specified with the -doclet tag on the command line. For example, running
% javadoc MyPackage
will use the standard doclet to produce the default-style HTML API documentation for MyPackage. Running javadoc without the -doclet option is equivalent to running javadoc using the -doclet option to invoke the standard doclet. That is,
% javadoc MyClass.java
is equivalent to
% javadoc -doclet com.sun.tools.doclets.standard.Standard MyClass.java

The Source for the Standard Doclet

If you download and install the JDK documentation bundle, you will find the source files for the standard doclet in the directories docs/tooldocs/javadoc/source and docs/tooldocs/javadoc/source/standard. You can browse the source code here:

Copyright © 1995-98 Sun Microsystems, Inc. All Rights Reserved.

Please send comments to: javadoc-tool@sun.com
Sun