Java Reference
In-Depth Information
Example 5.6 Sample Javadoc comment with at-tags
/**
* addWait - adds in the given wait time to all the counters;
* we could say much more about the method here, but let me say
* that we sometimes include HTML tags directly in our comments.
* Since Javadoc will run all our text together, we may need: <br>
* break tags <br>
* or paragraph tags <br>
* for spacing and separation.
* <p>We also add <i>other</i> HTML tags for <b>emphasis</b>.
* <p>You should still try to make the comment readable, though,
* for the programmer who is editing the source, not
* just for those looking at the formatted Javadoc.
* @author John Q. Programmer
* @version $Id$
*
* @param delay - elapsed time, in milliseconds
* @throws TakesTooLongException
* @returns total time, in milliseconds
*
* @see net.multitool.util.TakesTooLongException, net.multitool.ctrl.Time#count
*
*/
public long
addWait(long delay)
{
// ...
}
preceding whitespace or asterisks). The tag's data is everything from the end of
the tag to the end of the line (Example 5.6.)
Here are the standard at-tags:
@author
Everything from the tag to the end of the line is taken as the name of the
code's author.
@deprecated
Marks the method or class deprecated. This tag may be optionally followed
by explanatory text. If present, this text should describe when and why the
class or method was deprecated and what programmers should use instead.
Search WWH ::




Custom Search