The Prototype design pattern provides a solution:
Define a Prototype object
that returns a copy of itself.
Create new objects
by copying a Prototype object.
Describing the Prototype
design in more detail is the theme of the following sections.
See Applicability section for all problems Prototype can solve.
Prototype objects:
Prototype interface
(clone())
for copying itself.
Product1
object that
implements the clone() operation
can act as a prototype for creating
Product1 objects.
Prototype object
Product product = prototype.clone()).
Prototype objects,
which are copied to create new objects,
and even more,
Prototype objects can be
added and removed dynamically at
run-time.