Introduce Parameter Object <IMG SRC = "http://www.refactoring.com/catalog/updated.gif" border=0>
2003. 8. 2. 13:44
Introduce Parameter Object
Replace them with an object.
![](http://www.refactoring.com/catalog/introParamObj.gif)
For more information see page 295 of Refactoring
Additional Comments
Dealing with a chain of calls
Ralph Johnson pointed out to me that a common case isn't clear in the Refactoring book. This case is when you have a bunch of methods that call each other, all of which have a clump of parameters that need this refactoring. In this case you don't want to apply Introduce Parameter Object because it would lead to lots of new objects when you only want to have one object that's passed around.
The approach to use is to start with the head of the call chain and apply Introduce Parameter Object there. Then apply
Preserve Whole Object to the other methods.
***** 아름다운프로님에 의해서 게시물 복사 + 카테고리변경되었습니다 (2003-12-18 17:27)