Type
public class
system.reflection.Type
Description
Represents information about a Type that belongs to an assembly. Type is the root of System.Reflection functionality and is the entry point to obtaining data about Classes, Members, Methods, and other structures.
API overview
Constructor
Type
()
Functions
Public functions
| getAssembly (): Assembly |
native Gets the Assembly that the Type belongs to |
| getConstructor (): ConstructorInfo |
native Gets the Constructor for the Type |
| getFieldAndPropertyList (): Vector.<String> |
Gets a list of all FieldInfo and PropertyInfo names on the Type |
| getFieldInfo ( index: Number ): FieldInfo |
native Gets the FieldInfo associated with the specified index |
| getFieldInfoByName ( name: String ): FieldInfo |
native Gets a FieldInfo by its name |
| getFieldInfoCount (): Number |
native Gets the number of FieldInfo's associated with the Type and its inherited Fields |
| getFieldOrPropertyValueByName ( object: Object , _name: String , defaultValue: Object = null ): Object |
Helper function to get a value of a field or a property on an object by name |
| getFullName (): String |
native Gets the fully qualified name for the Type, including the package for the type but not the Assembly |
| getInterface ( index: Number ): Type |
native Gets the Interface Type associated with the specified index |
| getInterfaceCount (): Number |
native Gets the number of Interfaces's associated with the Type |
| getMethodInfo ( index: Number ): MethodInfo |
native Gets the MethodInfo associated with the specified index |
| getMethodInfoByName ( name: String ): MethodInfo |
native Gets the MethodInfo associated with the specified name |
| getMethodInfoCount (): Number |
native Gets the number of MethodInfo's associated with the Type and its inherited Methods |
| getParent (): Type |
native Gets the Base Parent Type that the Type belongs to |
| getPropertyInfo ( index: Number ): PropertyInfo |
native Gets the PropertyInfo associated with the specified index |
| getPropertyInfoByName ( name: String ): PropertyInfo |
native Gets a PropertyInfo by its name |
| getPropertyInfoCount (): Number |
native Gets the number of PropertyInfo's associated with the Type and its inherited Properties |
| getTypeByName ( fullName: String ): Type |
static native Gets a Type by its fully qualified name |
| isClass (): Boolean |
native Indicates whether the Type is a Class or not |
| isInterface (): Boolean |
native Indicates whether the Type is an Interface or not |
| isStruct (): Boolean |
native Indicates whether the Type is a Struct or not |
| setFieldOrPropertyValueByName ( object: Object , name: String , value: Object ): Boolean |
Helper function to set a value of a field or a property on an object by name |
| typeHasOwnProperty ( object: Object , name: String ): Boolean |
Constructor
Type ()
Functions
getAssembly (): Assembly
native
Gets the Assembly that the Type belongs to.
Returns
| Assembly | The Type's Assembly. |
getConstructor (): ConstructorInfo
native
Gets the Constructor for the Type.
Returns
| ConstructorInfo | The Constructor. |
getDeclaringType
(): Type
Inherited from MemberInfo
native
Gets the Type that the MemberInfo belongs to.
Returns
| Type | Type that the member info belongs to. |
getFieldAndPropertyList (): Vector.<String>
Gets a list of all FieldInfo and PropertyInfo names on the Type.
Returns
| Vector | List of names for all the Fields and Properties. |
getFieldInfo ( index: Number ): FieldInfo
native
Gets the FieldInfo associated with the specified index.
Parameters
| index: Number | Index of associated FieldInfo. |
Returns
| FieldInfo | Instance of the associated FieldInfo. |
getFieldInfoByName ( name: String ): FieldInfo
native
Gets a FieldInfo by its name.
Parameters
| name: String | Name of the FieldInfo to match. |
Returns
| FieldInfo | FieldInfo that matches to the name, null if the FieldInfo does not exist. |
getFieldInfoCount (): Number
native
Gets the number of FieldInfo's associated with the Type and its inherited Fields.
Returns
| Number | Number of FieldInfo's in the Type. |
getFieldOrPropertyValueByName ( object: Object , _name: String , defaultValue: Object = null ): Object
Helper function to get a value of a field or a property on an object by name.
Parameters
| object: Object | The target object that contains the field/property. |
| _name: String | Name of the property/field. |
| defaultValue: Object = null | Value that is returned if a field or property does not exist on the target object. |
Returns
| Object | Value of the property/field, default value if a field or property does not exist on the target object. |
getFullName (): String
native
Gets the fully qualified name for the Type, including the package for the type but not the Assembly.
Returns
| String | Fully qualified name for the Type. |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getInterface ( index: Number ): Type
native
Gets the Interface Type associated with the specified index.
Parameters
| index: Number | Index of associated Type. |
Returns
| Type | Type of the associated Interface. |
getInterfaceCount (): Number
native
Gets the number of Interfaces's associated with the Type.
Returns
| Number | Number of Interfaces's in the Type. |
getMemberType
(): Type
Inherited from MemberInfo
native
Gets the Type of the Member for example getMemberInfo on:
public var x:Number;
would return the System.Number type
Returns
| Type | Type of the member declaration |
getMetaInfo
(
name: String
): MetaInfo
Inherited from MemberInfo
native
Gets the MetaInfo for the specified Metadata tag name.
Parameters
| name: String | Name of the metadata tag to lookup. |
Returns
| MetaInfo | MetaInfo for the specified Metadata tag name, null if the name does not exist on the MemberInfo. |
getMethodInfo ( index: Number ): MethodInfo
native
Gets the MethodInfo associated with the specified index.
Parameters
| index: Number | Index of associated MethodInfo. |
Returns
| MethodInfo | Instance of the associated MethodInfo. |
getMethodInfoByName ( name: String ): MethodInfo
native
Gets the MethodInfo associated with the specified name.
Parameters
| name: String | Name of the MethodInfo. |
Returns
| MethodInfo | Instance of the associated FieldInfo, null if the method name does not exist. |
getMethodInfoCount (): Number
native
Gets the number of MethodInfo's associated with the Type and its inherited Methods.
Returns
| Number | Number of MethodInfo's in the Type. |
getName
(): String
Inherited from MemberInfo
native
Gets the name of the MemberInfo.
Returns
| String | Name of the MemberInfo. |
getOrdinal
(): Number
Inherited from MemberInfo
native
Gets the native ordinal for a MemberInfo.
Returns
| Number | 0 for no native ordinal, otherwise the native ordinal. |
getParent (): Type
native
Gets the Base Parent Type that the Type belongs to.
Returns
| Type | The Type's Base Parent Type. |
getPropertyInfo ( index: Number ): PropertyInfo
native
Gets the PropertyInfo associated with the specified index.
Parameters
| index: Number | Index of associated PropertyInfo. |
Returns
| PropertyInfo | Instance of the associated PropertyInfo. |
getPropertyInfoByName ( name: String ): PropertyInfo
native
Gets a PropertyInfo by its name.
Parameters
| name: String | Name of the PropertyInfo to match. |
Returns
| PropertyInfo | PropertyInfo that matches to the name, null if the PropertyInfo does not exist. |
getPropertyInfoCount (): Number
native
Gets the number of PropertyInfo's associated with the Type and its inherited Properties.
Returns
| Number | Number of PropertyInfo's in the Type. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeByName ( fullName: String ): Type
static native
Gets a Type by its fully qualified name.
Parameters
| fullName: String |
Returns
| Type | Type that matches to the name, null if the Type does not exist. |
getTypeInfo
(): Type
Inherited from MemberInfo
native
Returns the Type that represents the type that the member is or returns.
Returns
| Type | Type info for MemberInfos type. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |
setFieldOrPropertyValueByName ( object: Object , name: String , value: Object ): Boolean
Helper function to set a value of a field or a property on an object by name.
Parameters
| object: Object | The target object that contains the field/property. |
| name: String | Name of the property/field. |
| value: Object | Value to apply to the field/property on the target object. |