Packageorg.pranaframework.reflection
Classpublic class Type

Provides information about the characteristics of a class or an interface. These are the methods, accessors (getter/setter), variables and constants, but also if the class is dynamic and final.

Note that information about an object cannot be retrieved by calling the Type constructor. Instead use one of the following static methods:

In case of an instance: var type:Type = Type.forInstance(myInstance);

In case of a Class variable: var type:Type = Type.forClass(MyClass);

In case of a classname: var type:Type = Type.forName("MyClass");



Public Properties
 PropertyDefined by
  accessors : Array
Type
  clazz : Class
Type
  constants : Array
Type
  fields : Array
[read-only]
Type
  fullName : String
Type
  isDynamic : Boolean
Type
  isFinal : Boolean
Type
  isStatic : Boolean
Type
  methods : Array
Type
  name : String
Type
  staticConstants : Array
Type
  staticVariables : Array
Type
  variables : Array
Type
Public Methods
 MethodDefined by
  
Type()
Creates a new Type instance.
Type
  
forClass(clazz:Class):Type
[static] Returns a Type object that describes the given class.
Type
  
forInstance(instance:*):Type
[static] Returns a Type object that describes the given instance.
Type
  
forName(name:String):Type
[static] Returns a Type object that describes the given classname.
Type
  
getField(name:String):Field
Returns the Field object for the field in this type with the given name.
Type
  
getMethod(name:String):Method
Returns the Method object for the method in this type with the given name.
Type
Public Constants
 ConstantDefined by
  UNTYPED : Type
[static]
Type
  VOID : Type
[static]
Type
Property detail
accessorsproperty
accessors:Array  [read-write]Implementation
    public function get accessors():Array
    public function set accessors(value:Array):void
clazzproperty 
clazz:Class  [read-write]Implementation
    public function get clazz():Class
    public function set clazz(value:Class):void
constantsproperty 
constants:Array  [read-write]Implementation
    public function get constants():Array
    public function set constants(value:Array):void
fieldsproperty 
fields:Array  [read-only]Implementation
    public function get fields():Array
fullNameproperty 
fullName:String  [read-write]Implementation
    public function get fullName():String
    public function set fullName(value:String):void
isDynamicproperty 
isDynamic:Boolean  [read-write]Implementation
    public function get isDynamic():Boolean
    public function set isDynamic(value:Boolean):void
isFinalproperty 
isFinal:Boolean  [read-write]Implementation
    public function get isFinal():Boolean
    public function set isFinal(value:Boolean):void
isStaticproperty 
isStatic:Boolean  [read-write]Implementation
    public function get isStatic():Boolean
    public function set isStatic(value:Boolean):void
methodsproperty 
methods:Array  [read-write]Implementation
    public function get methods():Array
    public function set methods(value:Array):void
nameproperty 
name:String  [read-write]Implementation
    public function get name():String
    public function set name(value:String):void
staticConstantsproperty 
staticConstants:Array  [read-write]Implementation
    public function get staticConstants():Array
    public function set staticConstants(value:Array):void
staticVariablesproperty 
staticVariables:Array  [read-write]Implementation
    public function get staticVariables():Array
    public function set staticVariables(value:Array):void
variablesproperty 
variables:Array  [read-write]Implementation
    public function get variables():Array
    public function set variables(value:Array):void
Constructor detail
Type()constructor
public function Type()

Creates a new Type instance.

Method detail
forClass()method
public static function forClass(clazz:Class):Type

Returns a Type object that describes the given class.

Parameters
clazz:Class — the class from which to get a type description

Returns
Type
forInstance()method 
public static function forInstance(instance:*):Type

Returns a Type object that describes the given instance.

Parameters
instance:* — the instance from which to get a type description

Returns
Type
forName()method 
public static function forName(name:String):Type

Returns a Type object that describes the given classname.

Parameters
name:String — the classname from which to get a type description

Returns
Type
getField()method 
public function getField(name:String):Field

Returns the Field object for the field in this type with the given name.

Parameters
name:String — the name of the field

Returns
Field
getMethod()method 
public function getMethod(name:String):Method

Returns the Method object for the method in this type with the given name.

Parameters
name:String — the name of the method

Returns
Method
Constant detail
UNTYPEDconstant
public static const UNTYPED:Type
VOIDconstant 
public static const VOID:Type