有没有自动更新Javadoc的工具? [英] Are There Any Tools For Updating Javadoc Automatically?

查看:188
本文介绍了有没有自动更新Javadoc的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在代码库上工作......凌乱。这种混乱的一个方面是我们有很多方法,其签名不再与相关的Javadoc相匹配。例如:

I work on a code base that is ... messy. One aspect of this messiness is that we have a ton of methods whose signatures no longer match the associated Javadoc. For instance:

/**
 *
 * @ param foo
 */
public void doFoo(int bar) {...

我不是生成的粉丝Javadoc(因为它几乎总是毫无价值),但我真的可以使用一个工具来查看我们的代码,查找类似的情况,并且:

I'm no fan of generated Javadoc (as it's almost always worthless), but I really could use a tool that would go through our code, find cases like that, and:


  1. 删除fooparam的javadoc

  2. 为barparam添加javadoc(但只是一个空白的,没有自动生成的文档或任何东西)

这样的工具是否存在?如果没有,那么#1的工具是否存在?即便这样也会大大减少我们在构建中获得的垃圾警告量。谢谢。

Does such a tool exist? If not, does a tool that just does #1 exist? Even that much would significantly reduce the amount of garbage warnings we get in our builds. Thanks.

推荐答案

NetBeans有一个工具。它完全符合您的要求。

NetBeans has a tool for that. It does exactly what you ask.

您可以点击工具菜单,然后点击从顶部分析Javadocs
或右键单击文件并单击工具,然后分析Javadocs

You can either click on the Tools Menu, then Analyze Javadocs from the top, or right click on a file and click Tools, then Analyze Javadocs.

然后,这将为您提供一个列表,列出它在您的Javadocs中找到的所有问题以及修复它的选项。它允许您修复方法中的单个问题,修复方法的javadoc,文件,包或整个项目。

This then give you a list of all problems it finds with your Javadocs with an option to fix it. It allows you to fix a single problem in a method, fix the javadocs for the method, for the file, for the package, or for the entire project.

这篇关于有没有自动更新Javadoc的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆