actoryClass = $type.'Factory';$factory=new $factoryClass;$factory->CreateButton();$factory->CreateBorder();
Java.public class MacFactory {public class WinFactory {
适用性.在以下情况可以考虑使用抽象工厂模式：