流行的 javadoc 标签使用的一个很好的参考?
我想在我的 javadoc 中使用自定义标签,但要遵守某种约定,以便其他人可以更轻松地理解它们。在 Oracle 的官方 javadoc 文档页面上,他们列出了基本标签,与我的编辑器的 javadoc 代码提示中出现的标签列表相比,这是一个很小的集合。
网上是否有一个很好的参考资料,其中列出了流行的 javadoc 标签?
I'd like to use custom tags in my javadocs, but stick to some kind of convention so other people might have an easier time making sense of them. On Oracle's official javadoc documentation page, they've listed the basic tags, which is a small set, compared to the list of tags that appear in my editor's javadoc code hinting.
Is there a good reference online, which lists popular javadoc tags?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
并不是问题的真正答案,但相关:
要使用自定义 javadoc 标签,您必须使用自定义 doclet (它可以支持它想要的任何标签),将自定义 taglet 与标准 doclet 一起使用,或者使用
- tag
命令行参数来定义这些标签。否则,您将收到来自 javadoc 的警告(并且此标记没有输出)。因此,只有当您已经与使用自定义标签的人合作时,使用自定义标签才真正有意义,并且这个人会告诉您必须使用哪些 javadoc 选项。 (或者您自己添加这些选项)。
我不使用任何非标准标签,标准标签对我来说就足够了。
Not really an answer to the question, but related:
To use custom javadoc tags, you either have to use a custom doclet (which can support any tags it wants), use custom taglets with the standard doclet, or use the
-tag
command line parameter to define those tags. Otherwise you'll get a warning from javadoc (and no output for this tag).So it only really makes sense to use custom tags when you are already collaborating with someone who uses them, and this someone will say you what javadoc options you have to use. (Or you add those options yourself).
I don't use any nonstandard tags, the standard ones are enough for me.
我发现这个链接作为示例javadoc标签
I found out this link for examples of javadoc tags
您可以使用此网站或github 因为它显示了使用示例并提供了一些关于编码实践的很好的评论。
You can use this site or the github as it shows usage examples and provides some good commentary on coding practices.
StackOverflow 用户 Uri 提供了一个自定义标签列表,他建议将其作为他关于 javadoc 作为一种高效的博士研究的一部分。相关问题的答案 问题。您可以采用这些方法,并对您使用的东西有一定的信心,这些东西是经过一些研究支持的。
就我个人而言,我只是坚持使用标准 javadoc 标签,并遵守 Oracle (Sun) 如何为 Javadoc 工具编写文档注释。
StackOverflow user Uri has provided a list of custom tags that he proposes as part of his PhD research into the effectiveness of javadocs as an answer to a related question. You could adopt those and have some confidence that you're using something that is backed by some research.
Personally, I'd just stick with the standard javadoc tags and adhere to the best practices noted in Oracle's (Sun's) How to Write Doc Comments for the Javadoc Tool.
javadoc (Java JDK 8):
http://docs.oracle.com/javase /8/docs/technotes/tools/windows/javadoc.html#CHDJGIJB
javadoc (Java JDK 7): http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags
javadoc (Java JDK 8):
http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html#CHDJGIJB
javadoc (Java JDK 7): http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags