Doxygen and package.html

試著忘記壹切 提交于 2019-12-12 19:09:46

问题


As per javadoc specifications, I placed a documentation file called package-info.html in the root directory of the relevant package. When I run Doxygen on that folder, however, the documentation in this file is not picked up. How do I tell Doxygen to use this file as the package documentation? I also tried package.html, the old specification, but that doesn't work., either


回答1:


The new alternative way to provide documentation for a Java package is to use a file named package-info.java instead of package.html. (The file name is intentionally chosen not to be a valid class name.)

It has a different syntax:

/**
 * any javadoc comments (including tags)
 */
package name;

This is also the only way to provide package annotations (which are noted before the package keyword here, if any).

From your comments to the question, it looks like recent versions of Doxygen only understand this package-info.java, not the old package.html file.

I recall there being a module system proposed, which then would add a similar module-info.java file, but I don't find it now after a short googleing. (Maybe JSR 294?)



来源:https://stackoverflow.com/questions/7368584/doxygen-and-package-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!