O'Reilly logo

Refactoring to Patterns by Joshua Kerievsky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Accumulation

A good deal of code in software systems accumulates information. The refactorings in this section target the improvement of code that accumulates information within an object or across several objects.

A Collecting Parameter [Beck, SBPP] is an object that visits methods in order to accumulate information from them. The visited methods may reside within one object or many objects. Each visited method provides the Collecting Parameter with information. When all relevant methods have been visited, the accumulated information can be obtained from the Collecting Parameter.

Move Accumulation to Collecting Parameter (313) is often used in conjunction with the refactoring Compose Method (123). The combination of these refactorings ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required