Javadoc: Difference between revisions

Content deleted Content added
Tags: Edit for clarity; no periods since not sentences
Remove duplicate listing of some of the tags
Line 19:
|quote=When I did the original JavaDoc in the original compiler, even the people close around me pretty soundly criticized it. And it was interesting, because the usual criticism was: a good tech writer could do a lot better job than the JavaDoc does. And the answer is, well, yeah, but how many APIs are actually documented by good tech writers? And how many of them actually update their documentation often enough to be useful?}}</ref>
 
The <code>@fieldtag</code> syntax of Javadoc has been re-used by other documentation generators, including [[Doxygen]], [[JSDoc]], [https://www.erlang.org/doc/apps/edoc/chapter.html EDoc] and [[HeaderDoc]].
 
== Design ==
Line 30:
/**
* Provides some service
* @author Jill Smith <address @ example.com>
* @version 1.6
* @since 1.2
*/
public class Test {}
</syntaxhighlight>
 
For a method, the first paragraphline is a short description of the method. If more detail is warranted, then it may be followed by a longer description in additional paragraphs. Following that are optionally various fields such as:tags.
 
* <code>@param</code> to describe a method parameter
* <code>@return</code> to describe the return value
* <code>@throws</code> to describe exceptions the method may throw
* <code>@see</code> and other less-common tags
 
Various aspects of HTML as supported via Javadoc. For example <code>&lt;p&gt;</code> denotes a paragraph break.