Java Reference
In-Depth Information
19.2.12.
{@docRoot}
The files generated by
javadoc
are put into a tree, with subdirectories
that contain parts of the documentation. The exact placement of files in
the tree is up to the
javadoc
implementation, and may change depend-
ing on your environment, user preferences, and the like. You may want
to add things to the tree after it is built and then refer to those added
pieces in your doc comments.
The in-line
{@docRoot}
tag lets you put into your doc comments a relative
reference to other files in the documentation tree. The
{@docRoot}
tag will
be replaced with a relative path to the top of the generated documenta-
tion tree. For example, the sentence
Check out <a href="{@docRoot}/license.html">our license</a>.
would result in a sentence with a link to the file
license.html
in the root
of the documentation tree. After generating the documentation from the
doc comments, you could copy
license.html
into the top of the generated
documentation tree, and the above link would always go from the gen-
erated output to your
license.html
file. For some applications you may
find the mechanism described in "
The doc-files Directory
" on page
497
more useful.
19.2.13.
{@inheritDoc}
The
{@inheritDoc}
tag copies a documentation comment from the super-
type. This is discussed in the next section.