Content deleted Content added
Stevebroshar (talk | contribs) →Design: Smooth the transition to class (although could be smoother) |
Stevebroshar (talk | contribs) →Design: Edit for flow |
||
Line 23:
== Design ==
Javadoc ignores comments unless they are specially marked. A Javadoc comment is marked with an extra asterisk after the start of a multi-line comment: <code>/**</code>. A comment block pertains to the symbol that follows the block.
* <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▼
An example of a class header block follows:
Line 42 ⟶ 37:
</syntaxhighlight>
For a method, the first paragraph is a 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:
▲* <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><p></code> denotes a paragraph break.
An example of a method header block follows:
<syntaxhighlight lang="java">
/**
*
* <p>
* Longer description. If there were any, it would be
* <p>
* And even more
* paragraphs separated by
*
* @param
* @return Description
*/
public int methodName
</syntaxhighlight>
|