Applied Design Patterns with Java

Creational :: Factory Method (107) {C ch 4}

Applicability

Use the Factory Method pattern when


Structure



Participants

Product (Document) - defines the interface of objects the Factory Method creates.

ConcreteProduct (MyDocument)
- implements the Product interface.

Creator (Application)

ConcreteCreator (MyApplication) - overrides the Factory Method to return an instance of a ConcreteProduct.

Catalog Creational Prev Next