Dealing with Generalization
Managing inheritance hierarchies.
Table of Contents
- Pull Up Field: Move a field to the superclass.
- Pull Up Method: Move a method to the superclass.
- Push Down Field: Move a field to a subclass.
- Push Down Method: Move a method to a subclass.
- Extract Interface: Extract common methods to an interface.
- Collapse Hierarchy: Merge a subclass and superclass.
- Form Template Method: Implement the skeletal algorithm in a method in the superclass.
- Replace Inheritance with Delegation: Place the object in a field and delegate operations to it.
- Replace Delegation with Inheritance: Make the delegating class inherit from the delegate.