Stephen Colebourne recommends starting the description of the throws tag with an “if” clause for readability. Javadoc is a documentation generator created by Sun Microsystems for the Java language for generating API documentation in HTML format from Java source code. Otherwise you'll get a warning from javadoc (and no output for this tag). This tag will be positioned in a prominent way in the Javadoc. */, "Backfire!!! */, /** Use
to signal the start of a new paragraph. Documentation comments cannot be applied to a namespace. * For another way to kill a roadrunner, see the {@link Dynamite#blowDynamite()} method. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. If a method has void as a modifier, then it doesn’t return anything. There’s a short and long description. *
The Javadoc tool parses special tags when they are embedded within a Java doc comment. JAVADOC TAGS. However, the Oracle page is still in place and appears to be current; it also links to some related pages.
You add Javadoc tags to classes, methods, and fields. To include content in Javadoc, you add two asterisks at the start, before the class or method: (In Eclipse, if you type /** and hit return, it autofills the rest of the syntax automatically.). A good reference for popular javadoc tags to use? Otherwise Javadoc will produce an error. After the @param tag, add the parameter name, and then a description of the parameter, in lowercase, with no period, like this: The parameter description is a phrase, not a full sentence. In that case, it’s better to use tags. */, Reflecting seven years later about why we were laid off, Author in DITA and Publish with WordPress, Academic/Practitioner Conversations Project. 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.
You would only add doc comments to a field if it were something a user would use. When a method in a class implements a method in an interface However, the data type is visible from the parameters in the method. ", /** For example, @param latitude means the parameter is “latitude”. A parameter that the method or constructor accepts. As far as including the data type in the parameter description, Oracle says: By convention, the first noun in the description is the data type of the parameter. You can create links to other classes and methods using the {@link} tag. 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. Tags are processed on code constructs such as types and type members. * Longer description. Some IDEs, like IntelliJ IDEA, NetBeans and Eclipse, automatically generate Javadoc HTML. Many file editors assist the user in pro Javadoc: package.html or package-info.java, Maven is not working in Java 8 when Javadoc tags are incomplete, Concatenations of powers and their squares. You put the Javadoc description and tags before the class or method (no need for any space between the description and class or method).
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.