Doxygen 和 package.html

发布于 2024-12-03 14:36:44 字数 153 浏览 4 评论 0原文

根据 javadoc 规范,我在相关包的根目录中放置了一个名为 package-info.html 的文档文件。但是,当我在该文件夹上运行 Doxygen 时,不会拾取该文件中的文档。我如何告诉 Doxygen 使用此文件作为包文档?我也尝试了旧规范 package.html,但这不起作用。

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹿港巷口少年归 2024-12-10 14:36:44

为 Java 包提供文档的新替代方法是使用名为 package-info.java 的文件,而不是 package.html。 (故意选择文件名不是有效的类名。)

它具有不同的语法:

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

这也是提供包注释的唯一方法(在此处的 package 关键字之前注明,如果任何)。

从您对问题的评论来看,最新版本的 Doxygen 似乎只理解这个 package-info.java,而不是旧的 package.html 文件。

我记得有人提出了一个模块系统,然后它会添加一个类似的 module-info.java 文件,但在短暂的谷歌搜索后我现在没有找到它。 (也许是 JSR 294?)

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?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文