JavaDoc: where to add notes/remarks to documentation?

后端 未结 4 1903
轮回少年
轮回少年 2021-02-06 20:50

When coding in C# I have always found the tag remarks very useful for providing notes about the implementation of a class or method, or to give information about th

4条回答
  •  难免孤独
    2021-02-06 21:50

    You can create your own custom tags too.

    Here is a javadoc comment that includes the custom tag "@note":

        /**
         * Quark represents a quark.
         *
         * @note If you spin a quark, it will spin forever!
         */
        public class Quark {
    
        }
    

    To generate javadocs for the above, run javadoc like this:

    javadoc -tag note:a:"Note:" Quark.java

    Source: http://www.developer.com/java/other/article.php/3085991/Javadoc-Programming.htm

提交回复
热议问题