| Package | org.as3commons.reflect |
| Class | public class Type |
| Inheritance | Type MetadataContainer Object |
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");
| Property | Defined By | ||
|---|---|---|---|
| accessors : Array
An array of Accessor instances
| Type | ||
| alias : String | Type | ||
| applicationDomain : ApplicationDomain
The ApplicationDomain which is able to retrieve the object definition for this type. | Type | ||
| clazz : Class
The Class of the Type
| Type | ||
| constants : Array
An array of IMember instances that describe the constants of the Type
| Type | ||
| constructor : Constructor
A reference to a Constructor instance that describes the constructor of the Type
| Type | ||
| currentApplicationDomain : ApplicationDomain [static] [read-only] | Type | ||
| extendsClasses : Array | Type | ||
| fields : Array [read-only]
An array of all the static constants, constants, static variables and variables of the Type
| Type | ||
| fullName : String
The fully qualified name of the type, this includes the namespace
| Type | ||
| interfaces : Array | Type | ||
| isDynamic : Boolean
True if the Type is dynamic
| Type | ||
| isFinal : Boolean
True if the Type is final
| Type | ||
| isInterface : Boolean
True if the Type is an interface
| Type | ||
| isStatic : Boolean
True if the Type is static
| Type | ||
![]() | metadata : Array [read-only]
Returns an array of all metadata objects in this container. | MetadataContainer | |
| methods : Array
An array of Method instances
| Type | ||
| name : String
The name of the type
| Type | ||
| parameters : Array [read-only] | Type | ||
| properties : Array [read-only]
An array of Field containing all accessors and variables for the type. | Type | ||
| staticConstants : Array
An array of IMember instances that describe the static constants of the Type
| Type | ||
| staticVariables : Array
An array of IMember instances that describe the static variables of the Type
| Type | ||
| typeProviderKind : TypeProviderKind [static] | Type | ||
| variables : Array
An array of IMember instances that describe the variables of the Type
| Type | ||
| Method | Defined By | ||
|---|---|---|---|
Type(applicationDomain:ApplicationDomain)
Creates a new Type instance. | Type | ||
![]() | addMetadata(metadata:Metadata):void
Adds a Metadata object to this container. | MetadataContainer | |
createMetadataLookup():void | Type | ||
[static]
Returns a Type object that describes the given class. | Type | ||
forInstance(instance:*, applicationDomain:ApplicationDomain = null):Type [static]
Returns a Type object that describes the given instance. | Type | ||
[static]
Returns a Type object that describes the given classname. | Type | ||
Returns the Field object for the field in this type
with the given name. | Type | ||
![]() | getMetadata(key:String):Array
Returns the array of Metadata object that corresponds to the given key. | MetadataContainer | |
getMetadataContainers(name:String):Array
Retrieves an Array of MetadataContainer instances that are associated with the current Type
that contain Metadata with the specified name. | Type | ||
Returns the Method object for the method in this type
with the given name. | Type | ||
[static]
| Type | ||
![]() | hasExactMetadata(otherMetadata:Metadata):Boolean | MetadataContainer | |
![]() | hasMetadata(key:String):Boolean
Returns whether this object has meta data for the given key. | MetadataContainer | |
reset():void [static]
Clears the cache and set typeProvider to null. | Type | ||
| Constant | Defined By | ||
|---|---|---|---|
| PRIVATE : Type [static] | Type | ||
| UNTYPED : Type [static] | Type | ||
| VOID : Type [static] | Type | ||
| VOID_NAME : String = void [static] | Type | ||
| accessors | property |
accessors:Array
An array of Accessor instances
public function get accessors():Array public function set accessors(value:Array):voidSee also
| alias | property |
alias:String public function get alias():String public function set alias(value:String):void| applicationDomain | property |
applicationDomain:ApplicationDomain
The ApplicationDomain which is able to retrieve the object definition for this type. The definition does not
necessarily have to be part of this ApplicationDomain, it could possibly be present in the parent domain as well.
public function get applicationDomain():ApplicationDomain public function set applicationDomain(value:ApplicationDomain):void| clazz | property |
clazz:Class
The Class of the Type
public function get clazz():Class public function set clazz(value:Class):void| constants | property |
constants:Array
An array of IMember instances that describe the constants of the Type
public function get constants():Array public function set constants(value:Array):voidSee also
| constructor | property |
constructor:Constructor
A reference to a Constructor instance that describes the constructor of the Type
public function get constructor():Constructor public function set constructor(value:Constructor):voidSee also
| currentApplicationDomain | property |
currentApplicationDomain:ApplicationDomain [read-only] public static function get currentApplicationDomain():ApplicationDomain| extendsClasses | property |
extendsClasses:Array
public function get extendsClasses():Array public function set extendsClasses(value:Array):void| fields | property |
fields:Array [read-only]
An array of all the static constants, constants, static variables and variables of the Type
public function get fields():ArraySee also
| fullName | property |
fullName:StringThe fully qualified name of the type, this includes the namespace
public function get fullName():String public function set fullName(value:String):void| interfaces | property |
interfaces:Array public function get interfaces():Array public function set interfaces(value:Array):void| isDynamic | property |
isDynamic:Boolean
True if the Type is dynamic
public function get isDynamic():Boolean public function set isDynamic(value:Boolean):void| isFinal | property |
isFinal:Boolean
True if the Type is final
public function get isFinal():Boolean public function set isFinal(value:Boolean):void| isInterface | property |
isInterface:Boolean
True if the Type is an interface
public function get isInterface():Boolean public function set isInterface(value:Boolean):void| isStatic | property |
isStatic:Boolean
True if the Type is static
public function get isStatic():Boolean public function set isStatic(value:Boolean):void| methods | property |
methods:Array
An array of Method instances
public function get methods():Array public function set methods(value:Array):voidSee also
| name | property |
name:StringThe name of the type
public function get name():String public function set name(value:String):void| parameters | property |
parameters:Array [read-only] public function get parameters():Array| properties | property |
properties:Array [read-only] An array of Field containing all accessors and variables for the type.
public function get properties():ArraySee also
| staticConstants | property |
staticConstants:Array
An array of IMember instances that describe the static constants of the Type
public function get staticConstants():Array public function set staticConstants(value:Array):voidSee also
| staticVariables | property |
staticVariables:Array
An array of IMember instances that describe the static variables of the Type
public function get staticVariables():Array public function set staticVariables(value:Array):voidSee also
| typeProviderKind | property |
public static var typeProviderKind:TypeProviderKind| variables | property |
variables:Array
An array of IMember instances that describe the variables of the Type
public function get variables():Array public function set variables(value:Array):voidSee also
| Type | () | Constructor |
public function Type(applicationDomain:ApplicationDomain)
Creates a new Type instance.
applicationDomain:ApplicationDomain |
| createMetadataLookup | () | method |
public function createMetadataLookup():void| forClass | () | method |
public static function forClass(clazz:Class, applicationDomain:ApplicationDomain = null):Type
Returns a Type object that describes the given class.
Parameters
clazz:Class — the class from which to get a type description
| |
applicationDomain:ApplicationDomain (default = null) |
Type |
| forInstance | () | method |
public static function forInstance(instance:*, applicationDomain:ApplicationDomain = null):Type
Returns a Type object that describes the given instance.
Parameters
instance:* — the instance from which to get a type description
| |
applicationDomain:ApplicationDomain (default = null) |
Type |
| forName | () | method |
public static function forName(name:String, applicationDomain:ApplicationDomain = null):Type
Returns a Type object that describes the given classname.
Parameters
name:String — the classname from which to get a type description
| |
applicationDomain:ApplicationDomain (default = null) |
Type |
| getField | () | method |
public function getField(name:String, ns:String = null):Field
Returns the Field object for the field in this type
with the given name.
Parameters
name:String — the name of the field
| |
ns:String (default = null) |
Field |
| getMetadataContainers | () | method |
public function getMetadataContainers(name:String):Array
Retrieves an Array of MetadataContainer instances that are associated with the current Type
that contain Metadata with the specified name.
Each MetadataContainer instance can be one of these subclasses:
Parameters
name:String — The specified Metadata name.
|
Array — An Array of MetadataContainer instances.
|
| getMethod | () | method |
public function getMethod(name:String, ns:String = null):Method
Returns the Method object for the method in this type
with the given name.
Parameters
name:String — the name of the method
| |
ns:String (default = null) |
Method |
| getTypeProvider | () | method |
| reset | () | method |
public static function reset():voidClears the cache and set typeProvider to null.
| setParameters | () | method |
as3commons_reflect function setParameters(value:Array):voidParameters
value:Array |
| PRIVATE | Constant |
public static const PRIVATE:Type| UNTYPED | Constant |
public static const UNTYPED:Type| VOID | Constant |
public static const VOID:Type| VOID_NAME | Constant |
public static const VOID_NAME:String = void