Alternative classes with different interfaces smell
From CSSEMediaWiki
(Difference between revisions)
m (→See also) |
Brett Ward (Talk | contribs) m (links) |
||
Line 1: | Line 1: | ||
− | This smell occurs when two methods in different classes do the same thing but have a different method signature. You should try to | + | This smell occurs when two methods in different classes do the same thing but have a different method signature. You should try to [[Rename Method]]s that do the same thing in a consistent way. However, often there is a deeper problem where two classes are doing something very similar. You could try to [[Move Method]]s around or extract the common behavior into a common superclass. |
+ | |||
== See also == | == See also == |
Revision as of 23:20, 14 October 2009
This smell occurs when two methods in different classes do the same thing but have a different method signature. You should try to Rename Methods that do the same thing in a consistent way. However, often there is a deeper problem where two classes are doing something very similar. You could try to Move Methods around or extract the common behavior into a common superclass.
See also
Code smells | |
---|---|
Class Level: Alternative classes with different interfaces smell | Data class smell | Data clumps smell | Divergent change smell | Duplicate code smell | Inappropriate intimacy smell | Incomplete library class smell | Large class smell | Lazy class smell | Message chain smell | Middle man smell | Parallel inheritance hierarchies smell | Primitive obsession smell | Refused bequest smell | Shotgun surgery smell | Speculative generality smell | Temporary field smell
Method Level: Comments smell | Feature envy smell | Long method smell | Long parameter list smell | Switch statement smell |