Encapsulate Feature

a particular feature of a class is difficult to understand an control
move this particular feature into a class of its own

Context:

Encapsulation is a powerful mechanism to control the number of code adjustments required in order to perform a refactoring. Encapsulate Feature is a natural preparation step prior to moving or refactoring a certain feature.

Encapsulate Feature is an example of Introduce Indirection.

See also :Inline Feature, Replace Method With Method Object[Fowler], Extract Class[Fowler], Extract Method[Fowler], Replace Data Value With Object[Fowler], Replace Type Code With Class[Fowler]

Refactoring Thumbnails, Copyright © 2004 - 2005, Sven Gorts, All Rights Reserved.

[ Overview Page ] [ Thumbnail Catalog ]