抽象工厂模式(Abstract Factory Pattern)是围绕一个超级工厂创建其他工厂。该超级工厂又称为其他工厂的工厂。
TS中代码实现:
对比工厂模式:
总结:
1、通过一个工厂,去创建其他的工厂。