使用 Checkstyle 访问 Javadoc?

发布于 2025-01-08 14:55:20 字数 72 浏览 2 评论 0 原文

Checkstyle API 中有没有办法访问 javadoc 注释的文本? 如何?

“我还没找到我要找的东西”

Is there a way in the Checkstyle API to access the text of a javadoc comment?
How?

"I still haven't found what I'm looking for"

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

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

发布评论

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

评论(1

生活了然无味 2025-01-15 14:55:20

Checkstyle 提供了一个公开注释的 API。方法 FileContents.getJavadocBefore 可用于在文件中的某个位置之前定位 Javadoc。

查看处理 Javadoc 的 Checkstyle 检查的源代码 - 请参阅 此处。一个很好的例子是 JavadocStyleCheck

Checkstyle provides an API that does expose comments. The method FileContents.getJavadocBefore can be used to locate the Javadoc before a certain location in a file.

Have a look at the source code for the Checkstyle checks that process Javadoc - see here. A good example is JavadocStyleCheck.

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