Al's BrainDump

RSS

Navigation





Quick Search
»
Advanced Search »

PoweredBy

Factory Method

Factory methods can be used as opposed to a class constructor to return a new instance of a class - the exact class can be decided at runtime by a subclass - based on potentially complex logic that you want inside the class - otherwise you may have code duplication to implement logic every time the class is constructed.

ScrewTurn Wiki version 3.0.5.600. Some of the icons created by FamFamFam.