Static utility methods to reflectively create new instances.
public static function createForName(className:String, params:Array):Object
Creates a new instance of the class with the specified name.
Parameters
| className:String — the fully qualified name of the class
|
| |
| params:Array — the parameters to pass to the constructor of the class
|
Returns
| Object — the new instance
|
Throws
| — if the class with the specified name does not exist
|
public static function createNewInstance(type:Class, params:Array):Object
Creates a new instance of the specified class.
Parameters
| type:Class — the class to create a new instance of
|
| |
| params:Array — the parameters to pass to the constructor of the class
|
Returns
| Object — the new instance
|