Alternative classes with different interfaces smell

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: This smell occurs when two methods in different classes do the same thing but have a different method signature. You should try to rename the methods that do the same thing in a consistent...)
 
m (Reverted edits by Ebybymic (Talk); changed back to last version by Brett Ward)
 
(4 intermediate revisions by 4 users not shown)
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 rename the 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.
+
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 ==
 +
* [[Code smells]]
 +
 
 +
{{Template:CodeSmells}}
 +
 
 +
[[Category:Code smells]]

Latest revision as of 03:18, 25 November 2010

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


Personal tools