http://www.refactoring.com/catalog/moveMethod.html (一个不错的例子)
【code smells】
A method is, or will be, using or used by more features of another class than the class on which it is defined.
如果一个类的方法中过多的访问了另一个类的属性,那我们就应该考虑是不是把这个方法挪到另一个类中去。
http://www.refactoring.com/catalog/moveMethod.html (一个不错的例子)
【code smells】
A method is, or will be, using or used by more features of another class than the class on which it is defined.
如果一个类的方法中过多的访问了另一个类的属性,那我们就应该考虑是不是把这个方法挪到另一个类中去。