PMD规则之Coupling Rules

18 篇文章 1 订阅

·  CouplingBetweenObjects: This rule counts unique attributes, local variables and return types within an object. A number higher than specified threshold can indicate a high degree of coupling.

翻译  对象间的耦合:这个规则统计一个对象中单个的属性、本地变量和返回类型的数目。如果统计数目大于指定的上限值表示耦合度太高。

·  ExcessiveImports: A high number of imports can indicate a high degree of coupling within an object. Rule counts the number of unique imports and reports a violation if the count is above the user defined threshold.

翻译  过多的引入:大量的import表明对象有很高的耦合度。本规则统计单一的import数目,如果数目大于用户定义的上限则报告一个违例。

·  LooseCoupling: Avoid using implementation types (i.e., HashSet); use the interface (i.e, Set) instead

翻译  松耦合:避免使用具体实现类型(如:HashSet);用接口(如:Set)代替。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值