27 Refactoring

27.1 Smells . . . . . . . . . . . . . . . . . . . . . . .

27.2 Refactorings . . . . . . . . . . . . . . . . . . .

27.2.1 Built in Refactoring Methods . . . . . .

27.2.2 Introduce Null Object . . . . . . . . . .

27.2.3 Add and Remove Parameter . . . . . .

27.2.4 Cures for Switch Statements . . . . . .

27.2.5 Consolidate Conditional Expression . .

27.2.6 Convert Procedural Design to Objects .

27.2.7 Encapsulate Collection . . . . . . . . . .

27.2.8 Push Down or Pull Up Field or Method

27.2.9 Substitute Algorithm