Lazy class smell
From CSSEMediaWiki
(Difference between revisions)
JaninaVoigt (Talk | contribs) (New page: A lazy class is simply a class that doesn't do enough. This might happen when a class that used to do work gets downsized during refactoring or when a class is added in anticipation of a f...) |
m (→See also) |
||
(One intermediate revision by one user not shown) | |||
Line 2: | Line 2: | ||
Most of the time, a lazy class should simply be eliminated from the system. If the class that's lazy is a subclass, you can try to [[Collapse Hierarchy]]. In some cases, you can turn a lazy class into an [[Inline Class]]. | Most of the time, a lazy class should simply be eliminated from the system. If the class that's lazy is a subclass, you can try to [[Collapse Hierarchy]]. In some cases, you can turn a lazy class into an [[Inline Class]]. | ||
+ | |||
+ | == See also == | ||
+ | * [[Code smells]] | ||
+ | |||
+ | {{Template:CodeSmells}} | ||
+ | |||
+ | [[Category:Code smells]] |
Latest revision as of 09:32, 14 October 2009
A lazy class is simply a class that doesn't do enough. This might happen when a class that used to do work gets downsized during refactoring or when a class is added in anticipation of a future need that never eventuates.
Most of the time, a lazy class should simply be eliminated from the system. If the class that's lazy is a subclass, you can try to Collapse Hierarchy. In some cases, you can turn a lazy class into an Inline Class.
See also