The Factory Method Pattern
暂无分享,去创建一个
The factory method pattern is used when there is a choice to be made between classes that implement a common protocol or share a common base class. This pattern allows implementation subclasses to provide specializations without requiring the components that rely on them to know any details of those classes and how they relate to each other. Table 9-1 puts the factory method into context.