工厂模式的演变
摘要:
Simple FactoryIs a class that can product various sub types of Product. (It is better than the Static Factory. When new types are added the base Product class does not need to be changed only the Simple Factory Class)也许可以将enum为参数应用反射可以使我们不用改变SimpleFactory中的代码。即可以只改变enum中的个数。Factory MethodContains on 阅读全文