Bookcold

导航

设计模式—工厂方法(Factory Method)模式

一、工厂方法的职责

The Factory Method pattern is a way of creating objects, but letting subclasses decide exactly which class to instantiate. Various subclasses might implement the interface; the Factory Method instantiates the appropriate subclass based on information supplied by the client or extracted from the current state.

The design of this pattern enables the decision-making [...]

posted on 2010-04-22 20:36  bookcold  阅读(113)  评论(0)    收藏  举报