Prototype

This is a UML class diagram example for the prototype design pattern.

Purpose

Create objects based upon a template of an existing objects through cloning.

Use When

  • Composition, creation, and representation of objects should be decoupled from a system.
  • Classes to be created are specified at runtime.
  • A limited number of state combinations exist in an object.
  • Objects or object structures are required that are identical or closely resemble other existing objects or object structures.
  • The initial creation of each object is an expensive operation.
Import into your Project

Posted by: Willie Gonzalez