Creator is a factory class that uses a template and an array of arguments to create objects.
protected var dispatcher:IEventDispatcher
protected var generator:Class
protected var manager:IMateManager
Instance of IMateManager
used to get the logger object.
public function Creator(classGenerator:Class, dispatcher:IEventDispatcher = null)
Constructor
Parameters
| classGenerator:Class |
|
| dispatcher:IEventDispatcher (default = null )
|
public function create(loggerProvider:ILoggerProvider, notify:Boolean = false, constructorArguments:String = null, cache:* = none):Object
A method that calls createInstance to create the object
and logs any problem that may encounter.
Parameters
| loggerProvider:ILoggerProvider |
|
| notify:Boolean (default = false )
|
|
| constructorArguments:String (default = null )
|
|
| cache:* (default = none )
|
Returns
public function createInstance(template:Class, p:Array):Object
It is the actual creation method. It can throw errors if parameters are wrong.
Parameters
Returns