Skip to content
EntityQ637921· pop 31· linked from 117 articles

factory method pattern

Sign in to save

creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created

In the Vinony graph

Vinony's link graph records 117 inbound references to factory method pattern, and connects out to inheritance, International Standard Book Number and PHP.

It sits within the topics Method (computer programming) and Software design patterns.

Vinony links it to 28 Wikipedia language editions.

Wikidata facts

Show 3 more facts
described by source
Design Patterns
Commons gallery
Factory method
Sources (1)

via Wikidata · CC0

~13 min read

Encyclopedic overview

In object-oriented programming, the factory method pattern is a design pattern that uses factory methods to deal with the problem of creating objects without having to specify their exact classes. Rather than by calling a constructor, this is accomplished by invoking a factory method to create an object. Factory methods can be specified in an interface and implemented by subclasses or implemented in a base class and optionally overridden by subclasses. It is one of the 23 classic design patterns described in the book Design Patterns and is subcategorized as a creational pattern.

Overview

Excerpted from Wikipedia’s “factory method pattern” article, available under the CC BY-SA 4.0 licence.

Categories