JavaDoc: where to add notes/remarks to documentation?

后端 未结 4 1957
轮回少年
轮回少年 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:38

    As far as I know, there isn't any dedicated Javadoc tag for notes or remarks. Generally, the first sentence of Javadoc should give a brief description of the class/method/field. Then the full description should follow. And if you want to include any notes, a specialized paragraph with a "Note:" prepended should suffice.

    /**
     * Brief description. Full description of the method, generally without
     * implementation details.
     * 

    * Note: Additional information, e.g. your implementation notes or remarks. *

    * @param input description of the parameter * @return description of return value * * @since version * @author name of the author */ public boolean doSomething(String input) { // your code }

提交回复
热议问题