仅为接口生成 Javadoc?

发布于 2024-08-31 07:33:44 字数 124 浏览 2 评论 0原文

我正在寻找一种编写脚本的方法,该脚本只能为程序的接口(不适用于公共类)生成javadoc。我尝试过 Eclipse 内置工具,甚至 JAutodoc 工具,但还没有成功。

请问有人有什么想法吗?

谢谢。

I am finding a way to write a script that I can generate javadoc for my program's Interfaces only (not for public classes). I have tried Eclipse built-in tool and even JAutodoc tool but have not been successful yet.

Does anyone have some ideas, please?

Thanks.

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

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

发布评论

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

评论(1

皓月长歌 2024-09-07 07:33:44

就我个人而言,我会使用自定义 Ant 脚本(如果您熟悉它)。通过 javadoc 任务,您可以使用嵌套的“文件集”元素和动态生成的接口列表。或者只是使用脚本将所有接口复制到临时目录,运行 javadoc 并最终删除临时目录。最后甚至可以使用 bash 脚本来实现。

但是,如果您希望用户看不到您的实现类,则限制其可见性更有意义。然后您可以仅为公共条目生成文档。只是一个想法。

Personally, I would go with custom ant script (if you're familiar with it). With javadoc task you can use nested 'fileset' element with dynamically generated list of interfaces. Or just have script to copy all interfaces to temporary directory, run javadoc and remove temp dir in the end. Last can be implemented even with bash script.

But if you want user to not see your implementation classes, it makes more sense to limit their visibility. And then you can generate documentation only for public entries. Just a thought.

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