Packagecom.ericfeminella.products
Classpublic class ProductFactory

Application specific Factory Pattern implementation which defines an API that handles Product subclass instantiation



Public Methods
 MethodDefined by
  
ProductFactory is a static class.
ProductFactory
  
getProduct(productID:String):IProduct
[static] static method which handles Product subclass instantiation based on static constants defined in ProductFactoryType
ProductFactory
Constructor detail
ProductFactory()constructor
public function ProductFactory()

ProductFactory is a static class. ProductFactory instances are never to be instantiated. If an instance of ProductFactory is explicitly instantiated with the new keyword an error is thrown


Throws
— ProductFactoryInstantiationError
Method detail
getProduct()method
public static function getProduct(productID:String):IProduct

static method which handles Product subclass instantiation based on static constants defined in ProductFactoryType

Parameters
productID:String — a static constant representing an allowed type in ProductFactory

Returns
IProduct — IProduct interface which defines the subclass that is returned

See also