Content deleted Content added
+"control", link widget, link polymorphism |
|||
Line 74:
==Other benefits and variants==
Although the motivation behind the Factory Method pattern is to allow subclasses to choose which type of object to create, there are other benefits to using Factory Methods, many of which don't depend on subclassing.
Therefore, it is common to define "factory methods" that are not polymorphic to create objects in order to gain these other benefits. Such methods are often static.
|