Packageorg.swizframework.reflection
Classpublic class TypeDescriptor
InheritanceTypeDescriptor Inheritance Object

Object representation of a given type, based on flash.utils.describeType output and primarily focused on metadata.



Public Properties
 PropertyDefined By
  className : String
The fully qualified name of this type.
TypeDescriptor
  constants : Array
The constants defined by this class.
TypeDescriptor
  description : XML
Output of flash.utils.describeType for this type.
TypeDescriptor
  domain : ApplicationDomain
The Application Domain this TypeDescriptor is associated with
TypeDescriptor
  interfaces : Array
The fully qualified name of all interfaces this type implements.
TypeDescriptor
  metadataHosts : Dictionary
Dictionary of IMetadataHost instances for this type, keyed by name.
TypeDescriptor
  superClasses : Array
The fully qualified name of all superclasses this type extends.
TypeDescriptor
  type : Class
The Class of this type.
TypeDescriptor
Public Methods
 MethodDefined By
  
TypeDescriptor
  
fromXML(describeTypeXml:XML, domain:ApplicationDomain):TypeDescriptor
Populates the TypeDescriptor instance from the data returned by flash.utils.describeType.
TypeDescriptor
  
Return all MetadataHostMethod instances for this type.
TypeDescriptor
  
Return all MetadataHostProperty instances for this type.
TypeDescriptor
  
getMetadataHostsWithTag(metadataTagName:String):Array
Get all IMetadataHost instances for this type that are decorated with metadata tags with the provided name.
TypeDescriptor
  
getMetadataTagsByName(tagName:String):Array
Get all IMetadataTag instances for class member with the provided name.
TypeDescriptor
  
getMetadataTagsForMember(memberName:String):Array
Get all IMetadataTag instances for class member with the provided name.
TypeDescriptor
  
hasMetadataTag(metadataTagName:String):Boolean
Determine whether or not this class has any instances of metadata tags with the provided name.
TypeDescriptor
  
satisfiesType(typeName:String):Boolean
Returns true if this descriptor's className, superClass, or any interfaces match a typeName.
TypeDescriptor
Protected Methods
 MethodDefined By
  
Get IMetadataHost for provided XML node.
TypeDescriptor
  
getMetadataHosts(description:XML):Dictionary
Gather and return all properties, methods or the class itself that are decorated with metadata.
TypeDescriptor
Property Detail
classNameproperty
public var className:String

The fully qualified name of this type.

constantsproperty 
public var constants:Array

The constants defined by this class.

descriptionproperty 
public var description:XML

Output of flash.utils.describeType for this type.

domainproperty 
public var domain:ApplicationDomain

The Application Domain this TypeDescriptor is associated with

interfacesproperty 
public var interfaces:Array

The fully qualified name of all interfaces this type implements.

metadataHostsproperty 
public var metadataHosts:Dictionary

Dictionary of IMetadataHost instances for this type, keyed by name.

See also

superClassesproperty 
public var superClasses:Array

The fully qualified name of all superclasses this type extends.

typeproperty 
public var type:Class

The Class of this type.

Constructor Detail
TypeDescriptor()Constructor
public function TypeDescriptor()



Method Detail
fromXML()method
public function fromXML(describeTypeXml:XML, domain:ApplicationDomain):TypeDescriptor

Populates the TypeDescriptor instance from the data returned by flash.utils.describeType.

Parameters

describeTypeXml:XML
 
domain:ApplicationDomain

Returns
TypeDescriptor

See also

flash.utils.describeType
getMetadataHost()method 
protected function getMetadataHost(hostNode:XML):IMetadataHost

Get IMetadataHost for provided XML node.

Parameters

hostNode:XML — Node from flash.utils.describeType output

Returns
IMetadataHostIMetadataHost instance
getMetadataHostMethods()method 
public function getMetadataHostMethods():Array

Return all MetadataHostMethod instances for this type.

Returns
ArrayMetadataHostMethod instances

See also

getMetadataHostProperties()method 
public function getMetadataHostProperties():Array

Return all MetadataHostProperty instances for this type.

Returns
ArrayMetadataHostProperty instances

See also

getMetadataHosts()method 
protected function getMetadataHosts(description:XML):Dictionary

Gather and return all properties, methods or the class itself that are decorated with metadata.

Parameters

description:XML

Returns
DictionaryIMetadataHost instances
getMetadataHostsWithTag()method 
public function getMetadataHostsWithTag(metadataTagName:String):Array

Get all IMetadataHost instances for this type that are decorated with metadata tags with the provided name.

Parameters

metadataTagName:String — Name of tags to retrieve

Returns
ArrayIMetadataHost instances
getMetadataTagsByName()method 
public function getMetadataTagsByName(tagName:String):Array

Get all IMetadataTag instances for class member with the provided name.

Parameters

tagName:String — Name of metadata tags to find

Returns
ArrayIMetadataTag instances
getMetadataTagsForMember()method 
public function getMetadataTagsForMember(memberName:String):Array

Get all IMetadataTag instances for class member with the provided name.

Parameters

memberName:String — Name of class member (property or method)

Returns
ArrayIMetadataTag instances
hasMetadataTag()method 
public function hasMetadataTag(metadataTagName:String):Boolean

Determine whether or not this class has any instances of metadata tags with the provided name.

Parameters

metadataTagName:String

Returns
Boolean — Flag indicating whether or not the metadata tag is present
satisfiesType()method 
public function satisfiesType(typeName:String):Boolean

Returns true if this descriptor's className, superClass, or any interfaces match a typeName.

Parameters

typeName:String

Returns
Boolean