Show TOC

Configuring Javadoc GenerationLocate this document in the navigation structure

Procedure

Defining What to Include in the Javadoc

With the com.sap.javadoc.access=public|protected|package|private build option you can define exactly which type of information will be included in the Javadoc.

Value of com.sap.javadoc.access

Effect

protected

( Default ) Includes public and protected classes and members.

public

Includes only public classes and member

package

Includes public, protected, and package protected classes and members.

private

Includes all classes and members.

Defining Output Format

The output format can be defined with the build option com.sap.javadoc.formats=<comma-separated list of format tags> , where the currently available format tags are:

Value of com.sap.javadoc.formats

Effect

classic

Uses the Standard doclet of the underlying JDK to produce HTML documentation stored in a javadoc.zip archive. Note that the output of the Standard doclet is self-contained, that is, no links to symbols of other public parts are generated, and it is not possible to aggregate the Javadoc of multiple public parts to produce documentation for larger software units.

jdar

Uses a custom doclet to extract Javadoc comments, type information, and signatures of classes and members, and to store the result as .jdoc files in a .jdar archive. Such archives can be collected and aggregated from various public parts to produce HTML documentation for larger software units like software components or products.

html

Uses a custom doclet to produce extended HTML documentation stored in a javadoc.zip archive. In contrast to the classic format, additional information about the public part and the publishing DC is included in the generated documentation. However, the same limitations apply, that is, no links to symbols of other public parts are generated, and it is not possible to aggregate the Javadoc of multiple public parts to produce documentation for larger software units.

For more information, see Generating Javadoc for Large Software Units .

standard

( Default ) Equivalent to com.sap.javadoc.formats=jdar,html .

Note

The format JDAR can be combined with classic and html . If classic and html are used together, classic is ignored. By default, the format standard is used that produces both HTML documentation and .jdar archives.

Additional Options

The following build options are passed as command options to the Javadoc tool:

Build Option

Effect

com.sap.javadoc.breakiterator=on|off

(default: off ) Enables the usage of java.text.BreakIterator for the extraction of the first line of Javadoc comments.

For more information, see the -breakiterator option of the Javadoc command.

com.sap.javadoc.encoding=<charset>

Specifies the character encoding of the source files (default is com.sap.javadoc.encoding=UTF-8) and must be a valid IANA charset name that is supported by the underlying JDK.

For more information about IANA, see IANA Charset Registration Procedures - http://ietf.org/rfc/rfc2278.txt .

com.sap.javadoc.failonerror=on|off

(default: off ) Specifies whether the build should fail with a build error, if an issue with at least loglevel=warning is encountered. Otherwise, the generation continues and only the erroneous part is skipped.

com.sap.javadoc.loglevel=debug|verbose|info|warning|error

(default: info ) Specifies the level of logging details.

com.sap.javadoc.maxmemory

Specifies the amount of heap memory the Javadoc generator is allowed to use. For example, com.sap.javadoc.maxmemory=256m would allow the generator to use up to 256 megabytes; see -Xmx option of the Java compiler).

com.sap.javadoc.source=1.3|1.4|1.5|...

Specifies the Java language version to use (defaults to the corresponding setting com.sap.jdk.javac.source for the Java compiler).

com.sap.javadoc.quiet=on|off

(default: off ) Suppresses non-error and non-warning log messages. Equivalent to com.sap.javadoc.loglevel=warning .

For more information, see -quiet option of the Javadoc command.

com.sap.javadoc.verbose=true|false

Provides more detailed logging.

All other options of the Javadoc tool are either set by the build framework automatically, or are not supported.

Supported Doclet Options

Most of the options of the Standard doclet are supported to allow tweaking the HTML generation to your needs. If output format classic is used, all options are passed directly to the Standard doclet. Unless otherwise stated, the build option that corresponds to a doclet option with name <option> is:

com.sap.javadoc.standard.<option>=<value>

For example, to define Foobar API as the title of the generated documentation (option -doctitle of the Javadoc tool), you have to specify the build option: com.sap.javadoc.standard.doctitle=Foobar API

Note

If not explicitly defined, the document and window titles, as well as the header and footer texts, are derived from the current public part name.

More Information