Pull Up Constructor Body
From CSSEMediaWiki
(Difference between revisions)
(New page: If a superclass has many subclasses with similar or identical constructors try to move the body of the work into the superclass and simply call super in the subclasses. Th...) |
|||
Line 1: | Line 1: | ||
If a [[superclass]] has many [[subclass|subclasses]] with similar or identical constructors try to move the body of the work into the superclass and simply call super in the subclasses. This improves code reuse. | If a [[superclass]] has many [[subclass|subclasses]] with similar or identical constructors try to move the body of the work into the superclass and simply call super in the subclasses. This improves code reuse. | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | {{Refactoring}} |
Latest revision as of 22:19, 14 October 2009
If a superclass has many subclasses with similar or identical constructors try to move the body of the work into the superclass and simply call super in the subclasses. This improves code reuse.