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
|
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