List of Refactorings
| Refactoring | Page |
|---|---|
| Chain Constructors | 340 |
| Compose Method | 123 |
| Encapsulate Classes with Factory | 80 |
| Encapsulate Composite with Builder | 96 |
| Extract Adapter | 258 |
| Extract Composite | 214 |
| Extract Parameter | 346 |
| Form Template Method | 205 |
| Inline Singleton | 114 |
| Introduce Null Object | 301 |
| Introduce Polymorphic Creation with Factory Method | 88 |
| Limit Instantiation with Singleton | 296 |
| Move Accumulation to Collecting Parameter | 313 |
| Move Accumulation to Visitor | 320 |
| Move Creation Knowledge to Factory | 68 |
| Move Embellishment to Decorator | 144 |
| Replace Conditional Dispatcher with Command | 191 |
| Replace Conditional Logic with Strategy | 129 |
| Replace Constructors with Creation Methods | 57 |
| Replace Hard-Coded Notifications with Observer | 236 |
| Replace Implicit Language with Interpreter | 269 |
| Replace Implicit Tree with Composite | 178 |
| Replace One/Many Distinctions with Composite | 224 |
| Replace State-Altering Conditionals with State | 166 |
| Replace Type Code with Class | 286 |
| Unify Interfaces | 343 |
| Unify Interfaces with Adapter | 247 |
Refactoring Directions
| Pattern | To | Towards | Away |
|---|---|---|---|
| Adapter | Extract Adapter ( 258 ), Unify Interfaces with Adapter ( 247 ) | Unify Interfaces with Adapter ( 247 ) | |
| Builder | Encapsulate Composite with Builder ( 96 ) | ||
| Collecting Parameter | Move Accumulation to Collecting Parameter ( 313 ) | ||
| Command | Replace Conditional Dispatcher with Command ( 191 ) | Replace Conditional Dispatcher with Command ( 191 ) | |
| Composed Method | Compose Method ( 123 ) | ||
| Composite | Replace One/Many Distinctions with Composite ( 224 ), Extract Composite ( 214 ), Replace Implicit Tree with Composite ( 178 ) | Encapsulate Composite with Builder ( 96 ) | |
| Creation Method | Replace Constructors with Creation Methods ( 57 ) | ||
| Decorator | Move Embellishment to Decorator ( 144 ) | Move Embellishment to Decorator ( 144 ) | |
| Factory | Move Creation Knowledge to Factory ( 68 ), Encapsulate Classes with Factory ( 80 ) | ||
| Factory Method | Introduce Polymorphic Creation with Factory Method ( 88 ) | ||
| Interpreter | Replace Implicit Language with Interpreter ( 269 ) | ||
| Iterator | Move Accumulation to Visitor ( 320 ) | ||
| Null Object | Introduce Null Object ( 301 ) |
| Observer | Replace Hard-Coded Notifications with Observer ( 236 ) | Replace Hard-Coded Notifications with Observer ( 236 ) | | | Singleton | Limit Instantiation with Singleton ( 296 ) |
| Inline Singleton ( 114 ) | | State | Replace State-Altering Conditionals with State ( 166 ) | Replace State-Altering Conditionals with State ( 166 ) |
| | Strategy | Replace Conditional Logic with Strategy ( 129 ) | Replace Conditional Logic with Strategy ( 129 ) |
| | Template Method | Form Template Method ( 205 ) | |
| | Visitor | Move Accumulation to Visitor ( 320 ) | Move Accumulation to Visitor ( 320 ) |
|