java包循环检测:如何找到涉及的具体类? [英] java package cycle detection: how to find the specific classes involved?

查看:164
本文介绍了java包循环检测:如何找到涉及的具体类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您将建议哪些工具来检测 java包循环依赖性

知道目标是明确列出检测到的包裹循环'?



我知道课堂 JDepend ,但是他们都无法列出循环包中涉及的类依赖关系。

指标有一个有趣的图形表示周期,但再次限于包,很难阅读某个时间。



我很累了得到:


您有这3个软件包之间的软件包循环依赖

每个中有xxx课程


你知道任何工具需要额外的一步才能真正向你解释为什么循环是检测到(即'列出所涉及的课程')?






Riiight ...宣布结果的时间:



@ l7010.de谢谢你的努力。我会投票给你(当我有足够的代表),特别是对于CAP的回答...但是CAP在水中死了,不再符合我的日食3.4。其余的是商业的,我只看到免费软件



@ daniel6651谢谢,但如所说,只有免费软件(对不起,首先没有提到) p>

@izb作为findbugs的常用用户(现在使用最新的1.3.5),我只需点击一下即可接受您的答案...如果您可以向我解释什么选项是激活findbug检测任何循环。只有传递了0.8.7版本才提及该功能(查找新样式检测器查找类之间的循环依赖关系'),我无法测试它。

更新:现在工作,我有一个旧的findbugs配置文件,其中该选项不是活性。我仍然喜欢 CAD 虽然;)



答案是...见我自己的(第二个)答案下面

解决方案

Findbugs可以检测循环类依赖性,并且还有一个eclipse插件。



http://findbugs.sourceforge.net/


What tool would you recommend to detect java package cyclic dependencies,
knowing that the goal is to list explicitly the specific classes involved in the detected 'across-packages cycle' ?

I know about classycle and JDepend , but they both fail to list the classes involved in a cyclic package dependency.
Metrics has an interesting graphical representation of cycles, but again limited to packages, and quite difficult to read sometime.

I am getting tired to get a:

" you have a package cycle dependency between those 3 packages
you have xxx classes in each
good luck finding the right classes and break this cycle "

Do you know any tool that takes the extra step to actually explain to you why the cycle is detected (i.e. 'list the involved classes') ?


Riiight... Time to proclaim the results:

@l7010.de thank you for the effort. I will vote you up (when I will have enough rep), especially for the 'CAP' answer... but CAP is dead in the water and no longer compatible with my eclipse 3.4. The rest is commercial and I look only for freeware

@daniel6651 thank you but, as said, freeware only (sorry to not have mentioned it in the first place)

@izb as a frequent user of findbugs (using the latest 1.3.5 right now), I am one click away to accept your answer... if you could explain to me what option there is to activate for findbug to detect any cycle. That feature is only mentioned for the 0.8.7 version in passing (look for 'New Style detector to find circular dependencies between classes'), and I am not able to test it.
Update: works now, I had an old findbugs configuration file in which that option was not activated. I still like CAD though ;)

THE ANSWER is... see my own (second) answer below

解决方案

Findbugs can detect circular class dependencies, and has an eclipse plugin too.

http://findbugs.sourceforge.net/

这篇关于java包循环检测:如何找到涉及的具体类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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