Lexicon

Constructor-Valid State

Kind: technique

Layer: Design Patterns Core

Record: lexicon:constructor-valid-state

Canonical: Lexicon

A technique for having a constructor or factory accept only arguments that produce a valid object.

Listed in Lexicon terms, after Inheritance Complexity and before Repeated Expensive Setup.

Category

  • Creational Patterns

Refactors

  • Temporal Coupling

Linked from

  • Anti-patterns