Refactoring Table

This table is incomplete. It only lists some anti-patterns and some refactoring methods. A more complete table would be a valuable tool to programmers, who could use it to quickly decide how to remedy a problem at hand.

              Anti-Patterns

Refactoring
Methods

Bloated
Class

Lazy
Class

Too
Intimate

Duplicated
Code

Speculative Generality

Long Method

Middle
Man

Refused
Bequest

Switch

Extract Subclass

*

Extract Super class

Replace Type Tags

*

Replace Inheritance by Delegation

*

*

Replace Delegation by Inheritance

*

Replace 1-way association by 2-way

Replace 2-way association by 1-way

*

Replace Reference by Value

Replace Value by Reference

Extract Class

*

*

Inline Class

*

*

*

Hide Delegation

Eliminate Middleman

Collapse Hierarchy

*

*

Move Method

*

Extract Method

*

*

Eliminate Switch

*

Add Exits

*