英文:
Do we count depending interfaces while calculating Efferent Coupling value for a package
问题
我们在计算包的出口耦合度度量时,是否应计算接口?
英文:
Should we count interfaces while counting Efferent Coupling metrics for a package
答案1
得分: 0
以下是您要求的翻译内容:
以下维基百科页面链接:https://en.m.wikipedia.org/wiki/Efferent_coupling 定义了出弦耦合(Efferent Coupling):
【出弦耦合】衡量了一个类知道的数据类型数量。这包括继承、接口实现、参数类型、变量类型和异常。
所以是的,如果您的类实现了一个接口,您应该计算该接口。
英文:
The following Wikipedia page: https://en.m.wikipedia.org/wiki/Efferent_coupling defines Efferent Coupling as:
[Efferent Coupling] measures the number of data types a class knows about. This includes inheritance, interface implementation, parameter types, variable types, and exceptions.
So yes, if your class implements an interface, you should count that interface.
专注分享java语言的经验与见解,让所有开发者获益!
评论