Factory Method

This is a UML class diagram for the factory method design pattern.

Purpose

Exposes a method for creating objects, allowing subclasses to control the actual creation process.

Use When

  • A class will not know what classes it will be required to create.
  • Subclasses may specify what objects should be created.
  • Parent classes wish to defer creation to their subclasses.
Import into your Project

Posted by: Manuel Kearney