Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Refused Bequest
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
Subclasses that don't want or need what they inherit from their parents. They are given all these great gifts and pick just a few to play with.
Symptoms
- Subclass doesn't use inherited methods
- Subclass overrides methods to do nothing or throw exceptions
- Hierarchy seems wrong
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)