Lazy class smell

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
m (category)
m (See also)
 
Line 5: Line 5:
 
== See also ==
 
== See also ==
 
* [[Code smells]]
 
* [[Code smells]]
 +
 +
{{Template:CodeSmells}}
  
 
[[Category:Code smells]]
 
[[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


Personal tools