/** * See page 108 of DESIGN PATTERNS [1995]. * Implemented by Blueprint Technologies, Inc. */ /** * Package */ package com.blueprint.patterns.gamma.creational.factory_method; /** * Declares the factory method, which returns an object of * type Product. Creator may also define a default implementation * of the factory method that return a default ConcreteProduct object. * May call the factory method to create a Product object. */ public abstract class Creator { public void anOperation() { Product product = factoryMethod(); } protected abstract Product factoryMethod(); }