Inline Method

From CSSEMediaWiki
Revision as of 00:34, 29 July 2009 by Matthew Harward (Talk | contribs)
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

Personal tools