Knowledge
Search knowledge... ⌘K
Knowledge · Anti-Patterns
Smell Large Class
Anti-pattern indicating need for refactoring
Tags
refactoring-fowlercode-smellmaintainability
Impact
A class trying to do too much often shows up as too many instance variables. When a class has too many instance variables, duplicated code cannot be far behind.
Symptoms
- Too many instance variables
- Too much code in the class
- Duplicated code within the class
- Class does not use all instance variables all the time
Source
Martin Fowler — Refactoring: Improving the Design of Existing Code, 1st Edition (1999)