Inline Method

From CSSEMediaWiki
Revision as of 23:33, 28 July 2009 by Paul Williams (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is basically the opposite of the Extract Method where you replace method calls with the body of code

Sometimes the body of a method is as clear as the method name. Replacing the method call with the body of the method can help get rid of needless indirection.
Another time to use the inline method is when you have a group of badly factored methods. By using the inline method you can construct one big method then reextract the methods.

References

http://sourcemaking.com/refactoring/inline-method
Personal tools