9、Extract Interface(提取接口):当超过一个的类要使用某一个类中的部分方法时,应该接口他们之间的依赖,让调用者使用接口,这样可以降低代码耦合性。
基于518个网页-相关网页
...一个新类,以承担此类的部分职责 抽取子类(Extract SubClass),如果能可以划分类和新类之间的责任 抽取接口(Extract Interface),如果可以确定客户所用的特性子集 增加代码的表达能力.有可能暴露出重复性 过长的方法 存在大量的代码行.
基于106个网页-相关网页
Eclipse快捷键(中英文对照)转载 ... Extract Constant (撷取成常数:将数字撷取至新的Static字段,并使用新的Static字段) Extract Interface (撷取成界面:将原类别内的方法撷取至新接口中,原类别将实作该接口) Introduce Factory (采用代理:利用方法来取得建构子) ...
基于18个网页-相关网页
Extract t Interface 提炼接口
The intended interface is just one 'extract interface' refactoring away.
这个可能出现的接口正是基于对一个“提取接口”的重构之上。
The Extract interface refactoring makes an interface out of the methods defined in a class.
Extract Interface重构可以从一个类的已定义的方法生成一个接口。
The Extract interface dialog box displays default values for the name of the interface and the name of the code file in which it will be declared.
对话方块会显示预设的介面名称以及要在其中宣告介面的预设程序码档档名。
应用推荐