• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

抽象工厂是指提供一个接口来创建一系列相关或相互依赖的对象,而无需指定它们的特定类。

即一个工厂可以生产不同档次的产品(在具体的工厂类中用不同的方法创建不同的实例,这里实例对象的类实现不同的接口)。

客户端不依赖于如何创建和实现产品类实例的细节。主要用于系统的产品有多个产品族,系统只消耗一个产品族的产品的情况。

抽象工厂的缺点是不方便扩展产品族,增加了系统的抽象和理解难度。

Java.sql.Connection接口是一个抽象工厂,里面包含了语句、Blob、保存点等很多抽象产品。

抽象工厂

Link to comment
Share on other sites