Applied Design Patterns with Java

Creational :: Prototype (117) {C ch 8}

Applicability

Use the Prototype pattern when a system should be independent of how its products are created, composed, and represented; and


Structure



Participants

Prototype (Graphic) - declares an interface for cloning itself.

ConcretePrototype (Staff, WholeNote, HalfNote)
- implements an operation for cloning itself.

Client (GraphicTool)
- creates a new object by asking a prototype to clone itself.

Catalog Creational Prev Next