Move methods

From CSSEMediaWiki
Revision as of 20:37, 20 October 2010 by Benjamin Gibson (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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