Inline Method

When a layer of functional call indirection no longer serves a communication or factoring purpose, remove it by textually substituting the body of the function at the call sites. The inverse of ExtractMethod, and by far the less common of the two.

Analogously: DenormalizationIsOk

Given that most languages will do this as an optimization, or can be told to do this (the inline keyword in C/C++), this should be very rare. I would only recommend InlineMethod in two cases:

Both of these are quite rare, in my experience.


Also an optimisation performed by some compilers, whereby a method call is replaced by the actual code of the method being called. More usually referred to as MethodInlining.


CategoryRefactoring


EditText of this page (last edited March 10, 2004) or FindPage with title or text search