Javadoc: package.html or package-info.java

前端 未结 1 616
暖寄归人
暖寄归人 2020-12-02 04:30

When trying to create package level Javadoc comments, whats the preferred method? What do you do?

package-info.java

  • Pros
    • New
相关标签:
1条回答
  • 2020-12-02 04:50

    package-info.java: "This file is new in JDK 5.0, and is preferred over package.html."—javadoc - The Java API Documentation Generator

    Addendum: The big difference seems to be package annotations. There's a little more in the way of rationale in 7.4 Package Declarations.

    Addendum: The annotation feature is also mentioned here and here.

    Addendum: See also What’s package-info.java for?.

    0 讨论(0)
提交回复
热议问题