Supported Javadoc
=================
Write API documentation as traditional Javadoc comments. This page lists what
renders as native Sphinx content. Anything else produces a warning; see
:doc:`troubleshooting` for alternatives and :doc:`compatibility` for known limits.
Tags and HTML
-------------
Supported traditional Javadoc content includes descriptions, ``@param`` (including
type parameters), ``@return``, ``@throws``/``@exception``, ``@see``, ``@since`` and
``@deprecated``, plus the JDK's ``@apiNote``, ``@implSpec`` and ``@implNote`` notes,
which use the standard doclet's headings and are not inherited. ``@author``,
``@version`` and the ``@serial`` tags are omitted without a warning, as the standard
doclet does by default; other custom tags warn. Inline ``code``, ``literal``, ``link``, ``linkplain``, ``value`` and
``inheritDoc`` are processed from compiler trees. HTML paragraphs, nested
ordered/unordered lists, tables, preformatted code, emphasis, strong text and absolute HTTP(S)/mailto links become
native nodes. Literal text is never interpreted as RST, and raw HTML is not emitted.
HTML link attribute entities are decoded once, and ``
`` preserves line breaks
and inline formatting. Repeated ``@throws`` descriptions for the same exception
are retained in order, including when inherited.
Constant values
---------------
``{@value}`` shows a constant in Java source form, as the standard doclet does:
strings are quoted and escaped, characters quoted, and ``long``/``float`` values keep
their ``L``/``f`` suffix. ``{@value Type#FIELD}`` links to the field, including external
Javadoc fields such as ``Double#MAX_VALUE``; bare ``{@value}`` in a constant's own
comment is plain text. An optional ``java.util.Formatter`` format, such as
``{@value %x #MASK}``, is applied with the root locale. References to non-constant
fields, bare ``{@value}`` outside a constant and invalid formats warn.
Tables
------
HTML tables become native Sphinx tables with ``
| `` cells outside the header render as
ordinary cells. Wide tables scroll horizontally within the content column, and code in
cells is not wrapped. Text from ``{@literal}`` and ``{@value}`` keeps straight quotes
because Sphinx's smart quotes are not applied to it.
Inherited documentation
-----------------------
Overriding methods inherit omitted descriptions, parameters, returns and declared
throws documentation. Parameter matching is positional, so renamed parameters work.
Generic exception types are substituted through the compiler's view of the parent
method: ``Contract |
|---|