9、Extract Interface(提取接口):当超过一个的类要使用某一个类中的部分方法时,应该接口他们之间的依赖,让调用者使用接口,这样可以降低代码耦合性。
基于518个网页-相关网页
...一个新类,以承担此类的部分职责 抽取子类(Extract SubClass),如果能可以划分类和新类之间的责任 抽取接口(Extract Interface),如果可以确定客户所用的特性子集 增加代码的表达能力.有可能暴露出重复性 过长的方法 存在大量的代码行.
基于106个网页-相关网页
Extract t Interface 提炼接口
The Extract interface refactoring makes an interface out of the methods defined in a class.
Extract Interface重构可以从一个类的已定义的方法生成一个接口。
The dialog box that displays is similar to the Extract Interface dialog box and allows you to name the new superclass and select the methods and fields that will be put in the superclass.
一个与Extract Interface相似的对话框会出现,可以在这个对话框中给这个新的超类命名并选择要放入这个超类的方法和字段。
应用推荐