我正在使用 JavaDoc 描述一些类,分为两步简短描述和该描述的开发版本:
/*
*
* This class will be used to do things.
* <p>
* Here I am expanding the short description ...
* </p>
* ...
*/
Class myClass
{
...
...
...
}
我想知道是否可以在详细描述中包含列表和枚举,因此结果应该类似于:
/*
*
* This class will be used to do things.
* <p>
* Here I am expanding the short description ...
* * List element 1
* * List element 2
* </p>
* ...
*/
Class myClass
{
...
...
...
}
但在 JavaDoc 的 HTML 输出中生成枚举和/或列表。
我应该使用 HTML 元素,例如 <ul>
和<ol>
在 JavaDoc 注释中?
最佳答案
是的,HTML 元素如
* <ul>
* <li>Item1</li>
* <li>Item2</li>
* </ul>
在 javadoc 中完全没问题。查看标准 Java API 类以获取更多示例。
关于java - 在详细的 java doc 类描述中包含枚举,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22578214/