Move methods

From CSSEMediaWiki
Jump to: navigation, search

A method is, or will be, using or used by more features of another class than the class on which it is defined.

Create a new method with a similar body in the class it uses most. Either turn the old method into a simple delegation, or remove it altogether.

07fig01.gif

from http://sourcemaking.com/refactoring/move-method

Personal tools