开发者

A good reference for popular javadoc tags to use?

开发者 https://www.devze.com 2023-03-08 06:29 出处:网络
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, the开

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, the开发者_JS百科y'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?


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


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.


I found out this link for examples of javadoc tags


You can use this site or the github as it shows usage examples and provides some good commentary on coding practices.

0

精彩评论

暂无评论...
验证码 换一张
取 消