Packageorg.spicefactory.lib.util
Classpublic class ClassUtil

Static utility methods to reflectively create new instances.



Public Methods
 MethodDefined by
  
createForName(className:String, params:Array):Object
[static] Creates a new instance of the class with the specified name.
ClassUtil
  
createNewInstance(type:Class, params:Array):Object
[static] Creates a new instance of the specified class.
ClassUtil
Method detail
createForName()method
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
createNewInstance()method 
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