Java Reference
In-Depth Information
@version <version-text>
The @version tag adds a Version section to the generated documentation. The version text should contain the current
version of the program element. The @since tag is used to specify the version of the software when a program
element was added whereas the @version tag is used to specify the current version. The following documentation
comment shows how to use @version tag:
/**
* A dummy class.
*
* @since 1.0
* @version 1.6
*/
public class Dummy {
}
{@code <text>}
It displays the specified text in code font without interpreting the text as HTML markup or nested documentation
comments tag. It is equivalent to
<code>{@literal <text>}</code>
{@docRoot}
It resolves to the relative path of the root directory of the generated documents. It is used in the URL part of links.
Suppose you have a file called myfiles/copyright.html that is located under the root directory of the generated
documents. If you want to include a link to the copyright.html file in your documentation comment, you can do the
following:
/**
* A dummy class. Please read
* the <a href="{@docRoot}/myfiles/copyright.html">Copyright</a> page.
*/
public class Dummy {
}
{@inheritDoc}
It copies the documentation of a method from the nearest inheritable class or the implementable interface. Note that
for this tag to copy the documentation, the method in which this tag appears must override a method in its parent
class or implement a method of the implemented interfaces.
This tag may be used only inside the main description in the documentation comment for a method or inside
the text argument of @return , @param , and @throws tags for a method. If it appears inside the main description, it
copies the main description of the overridden method. If it appears in other tag's text, it copies the tag's text from the
overridden method.
If a method overrides a method in the parent class or implements a method of an interface, the javadoc
tool automatically copies the documentation for the main description, @return , @param and @throws if the main
description of these tags is missing in the overriding method.
 
Search WWH ::




Custom Search