`

无用代码扫描工具UCDetector

 
阅读更多

本文主要介绍UCDetector(无用代码扫描工具)使用方法及局限

 

对于沉积或多方接手开发的项目经常会遇到一坨一坨无用的代码,但一个一个类查找又相当费时,这里介绍一个eclipse插件扫描没有引用的类、方法、常量。

 

插件名为UCDetector,介绍地址为http://www.ucdetector.org/index.html

eclipse update site为:http://ucdetector.sourceforge.net/update

 

使用方法为在工程上(可以shift选择多个模块)右击选择UCDetector->Detect unnecessary code

扫描完成后在eclipse安装目录的ucdetector_reports文件夹下生成html报告,可以进入查看

 

html中java type指示扫描出来的类型,截图如下

 

插件局限:即以下代码引用方式UCDetector无法扫描到,需要手动判断:

1、反射

2、类似spring的在xml中配置注入方式

3、第三方调用

4、jar调用

 

  • 大小: 152.9 KB
分享到:
评论
4 楼 Trinea 2013-05-31  
nathan09 写道
Trinea 写道
nathan09 写道
我看到了Aone

哈哈

搞Aone的同事?

嘿嘿不是,以前一个Team的,不过属于另外一个项目组
3 楼 nathan09 2013-05-31  
Trinea 写道
nathan09 写道
我看到了Aone

哈哈

搞Aone的同事?
2 楼 Trinea 2013-05-31  
nathan09 写道
我看到了Aone

哈哈
1 楼 nathan09 2013-05-31  
我看到了Aone

相关推荐

Global site tag (gtag.js) - Google Analytics