Javadoc 结束标记

标签 java javadoc

<分区>

阅读 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){
}

文档指出:

If you have more than one paragraph in the doc comment, separate the paragraphs with a <p> paragraph tag, as shown.

在 Eclipse 中,Javadoc 的格式是正确的,但仅仅因为它有效,就意味着它是“正确的”吗?

最佳答案

是的,这是正确的。引自 the specifications :

Some HTML element types allow authors to omit end tags (e.g., the P and LI element types)

关于Javadoc 结束标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33787753/

相关文章:

java - 我怎样才能得到所有方法的 javadoc 与特定的注释,方法名称和包/类名称?

java - 如何将 javadoc 链接到私有(private)字段?

java - 对于什么都不做的方法,您为 javadoc 编写了什么?

java - 如何在 Eclipse 中查看 Spring Framework Javadoc?

java - 更改 jTextPane 中选定文本的颜色

java - 将字符串作为 url 传递并加载到 webView 中

java - com.microsoft.sqlserver.jdbc.SQLServerException : There are more columns in the INSERT statement than values specified in the VALUES clause

java扩展泛型类型不明确的方法调用

java - 完全支持 PostgreSQL 数据类型的 JPA 实现?

Javadoc @link 不同的返回类型