Javadoc
一、javadoc是什么?
javadoc其实是注释,用于描述类或者方法的作用。Javadoc可以写在类上面和方法上面。
二、Javadoc怎么写?
包括三个要素:
1.概要描述,往往用一句话或一段话来简要描述该类或方法的作用
/**
* Miscellaneous {@link String} utility methods.
*
*/
在注释中以@开头的被称为Javadoc文档标记,是JDK定义好的,@author、@version、@since、@see、@link、@code、@param、@return、@exception、@throws等。
2.详细描述,一般用一段或者几段来详细描述类或方法的作用,详细描述中可以使用html标签,如<p>、<pre>、<a>、<ul>、<i>
等标签, 通常详细描述都以段落p标签开始。
pre元素可定义预格式化的文本。被包围在pre元素中的文本通常会保留空格和换行符。而文本也会呈现为等宽字体,pre标签的一个常见应用就是用来表示计算机的源代码。
详细描述和概要描述中间通常有一个空行来分割
/**
* Miscellaneous {@link String} utility methods.
*
* <p>Mainly for internal use within the framework; consider
* <a href="http://commons.apache.org/proper/commons-lang/">Apache's Commons Lang</a>
* for a more comprehensive suite of {@code String} utilities.
*
* <p>This class delivers some simple functionality that should really be
* provided by the core Java {@link String} and {@link StringBuilder}
* classes. It also provides easy-to-use methods to convert between
* delimited strings, such as CSV strings, and collect