Packagecom.asfusion.mate.core
Classpublic class Creator

Creator is a factory class that uses a template and an array of arguments to create objects.



Protected Properties
 PropertyDefined by
  dispatcher : IEventDispatcher
Creator
  generator : Class
Creator
  manager : IMateManager
Instance of IMateManager used to get the logger object.
Creator
Public Methods
 MethodDefined by
  
Creator(classGenerator:Class, dispatcher:IEventDispatcher = null)
Constructor
Creator
  
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.
Creator
  
createInstance(template:Class, p:Array):Object
It is the actual creation method.
Creator
Property detail
dispatcherproperty
protected var dispatcher:IEventDispatcher

generatorproperty 
protected var generator:Class

managerproperty 
protected var manager:IMateManager

Instance of IMateManager used to get the logger object.

Constructor detail
Creator()constructor
public function Creator(classGenerator:Class, dispatcher:IEventDispatcher = null)

Constructor

Parameters
classGenerator:Class
 
dispatcher:IEventDispatcher (default = null)
Method detail
create()method
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
Object
createInstance()method 
public function createInstance(template:Class, p:Array):Object

It is the actual creation method. It can throw errors if parameters are wrong.

Parameters
template:Class
 
p:Array

Returns
Object