<< Chapter < Page | Chapter >> Page > |
Card 3 / 5:
hoisting
The act of removing equivalent methods or fields common to all subclasses and moving them to their superclass. While this saves one from repeating code over and over again in the subclasses, the act of hoisting does not guarantee that the hoisted fields or methods are indeed true invariants of the subclasses. That is hoisting does not guarantee that the hoisted items are part of the abstraction of the subclasses. This is because hoisting assumes that all possible subclasses are known at the time the hoisting takes place, which is not always true.
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | ↑ / ↓ / Return / Space |
Notification Switch
Would you like to follow the 'Design patterns' conversation and receive update notifications?