Self Encapsulate Field
From CSSEMediaWiki
Revision as of 20:55, 14 October 2009 by Brett Ward (Talk | contribs)
This refactoring is essentially the act of taking direct accesses to a field and changing them to instead be accessed via a getter or setter method.
This leads to the decisions of indirect variable access versus direct variable access, with their various advantages. Fowler prefers to use direct access until it "gets in the way", and changing when things become awkward.
See Also