Packagecom.ericfeminella.utils.introspection
Classpublic class Reflection

Returns the class Object based on a String name representation



Public Methods
 MethodDefined by
  
getType(type:String):Class
[static] Returns the class Object for the String name representation specified in the type parameter.
Reflection
Method detail
getType()method
public static function getType(type:String):Class

Returns the class Object for the String name representation specified in the type parameter.

Keep in mind that you will always need an internal reference to the class that is passed to getType();

   For instance, the following code below will throw an error if
   there is not an instance of a DataGrid defined previously:

   var ClassReference:Class = Reflection.getType("mx.controls.DataGrid");
   var dataGrid:DataGrid = new ClassReference();
   //throws an exception since Flash Player does not contain a reference
   //to mx.controls.DataGrid

   The following will not throw an error as Flash Player has reference to
   mx.controls.DataGrid

   import mx.controls.DataGrid;

   var dg:DataGrid;

   var ClassReference:Class = Reflection.getType("mx.controls.DataGrid");
   var dataGrid:DataGrid = new ClassReference();
   //executes without error
   
Parameters
type:String — String representation of the class type

Returns
Class

Throws