【发布时间】:2016-02-20 15:25:48
【问题描述】:
阅读Oracle's Javadoc Documentation,注意到作者没有关闭<p>标签。
/**
* The method used for creating the tree. Any structural
* modifications to the display of the Jtree should be done
* by overriding this method.
* <p>
* This method adds an anonymous TreeSelectionListener to
* the returned JTree. Upon receiving TreeSelectionEvents,
* this listener calls refresh with the selected node as a
* parameter.
*/
public JTree makeTree(AreaInfo ai){
}
文档说明:
如果文档注释中有多个段落,请使用
<p>段落标签分隔段落,如图所示。
在 Eclipse 中,Javadoc 的格式是正确的,但仅仅因为它有效,就意味着它是“正确的”吗?
【问题讨论】:
-
我认为 Java 社区已接受您的 javadoc doc 标签不必是语法正确的 HTML。事实上,我只见过一个地方有人费心将
</p>放在他们的 javadoc 中。