设计模式—工厂方法(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 [...]
浙公网安备 33010602011771号