Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.rpc.xml 
SchemaTypeRegistry 
Packagemx.rpc.xml
Classpublic class SchemaTypeRegistry
InheritanceSchemaTypeRegistry Inheritance Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

XMLDecoder uses this class to map an XML Schema type by QName to an ActionScript Class so that it can create strongly typed objects when decoding content. If the type is unqualified the QName uri may be left null or set to the empty String.

It is important to note that the desired Class must be linked into the SWF and possess a default constructor in order for the XMLDecoder to create a new instance of the type, otherwise an anonymous Object will be used to hold the decoded properties.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined By
  
Looks for a registered Class for the given type.
SchemaTypeRegistry
  
Returns the Class for the collection type represented by the given Qname or String.
SchemaTypeRegistry
  
[static] Returns the sole instance of this singleton class, creating it if it does not already exist.
SchemaTypeRegistry
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
registerClass(type:Object, definition:Object):void
Maps a type QName to a Class definition.
SchemaTypeRegistry
  
Maps a type name to a collection Class.
SchemaTypeRegistry
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
Removes a Class from the registry for the given type.
SchemaTypeRegistry
  
Removes a collection Class from the registry for the given type.
SchemaTypeRegistry
 Inherited
Returns the primitive value of the specified object.
Object
Method Detail

getClass

()method
public function getClass(type:Object):Class

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Looks for a registered Class for the given type.

Parameters

type:Object — The QName or String representing the type name.

Returns
Class — Returns the Class for the given type, or null of the type has not been registered.

getCollectionClass

()method 
public function getCollectionClass(type:Object):Class

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the Class for the collection type represented by the given Qname or String.

Parameters

type:Object — The QName or String representing the collection type name.

Returns
Class — Returns the Class for the collection type represented by the given Qname or String.

getInstance

()method 
public static function getInstance():mx.rpc.xml:SchemaTypeRegistry

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Returns the sole instance of this singleton class, creating it if it does not already exist.

Returns
mx.rpc.xml:SchemaTypeRegistry — Returns the sole instance of this singleton class, creating it if it does not already exist.

registerClass

()method 
public function registerClass(type:Object, definition:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Maps a type QName to a Class definition. The definition can be a String representation of the fully qualified class name or an instance of the Class itself.

Parameters

type:Object — The QName or String representation of the type name.
 
definition:Object — The Class itself or class name as a String.

registerCollectionClass

()method 
public function registerCollectionClass(type:Object, definition:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Maps a type name to a collection Class. A collection is either the top level Array type, or an implementation of mx.collections.IList. The definition can be a String representation of the fully qualified class name or an instance of the Class itself.

Parameters

type:Object — The QName or String representation of the type name.
 
definition:Object — The Class itself or class name as a String.

unregisterClass

()method 
public function unregisterClass(type:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Removes a Class from the registry for the given type.

Parameters

type:Object — The QName or String representation of the type name.

unregisterCollectionClass

()method 
public function unregisterCollectionClass(type:Object):void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Removes a collection Class from the registry for the given type.

Parameters

type:Object — The QName or String representation of the collection type name.