Lexicon

Subclass Explosion

Kind: anti-pattern

Layer: Design Patterns Core

Record: lexicon:subclass-explosion

Canonical: Lexicon

Creating a distinct subclass for every combination of optional features instead of composing them at runtime.

Listed in Lexicon terms, after Per-Instance Duplicate State and before High-Cardinality Object Reuse.

Category

  • Structural Patterns

Negated by

  • Decorator Pattern

Violates

  • Decorator Pattern

Linked from

  • Structural Patterns