Factory Method

xiaoxiao2021-03-06  64

definition

Name: Factory Structure: Title: Define an interface for creating an object, which allows the subclass to instantize which class. Factory Method delays a class of instantiation to their subclasses. Applicability: When a class does not know the class of the object it must create. When a class wants to specify the object it created by its subclass. When classes will create a responsibility of the object to a multiple help subclass, and which helper subclass will be the agent of the agent. effect:

Classic Case

1,

Best Practices

1,

Related mode

1,

Reference article

1,

转载请注明原文地址:https://www.9cbs.com/read-85674.html

New Post(0)