Packageorg.spicefactory.lib.reflect.converter
Classpublic class EnumerationConverter
InheritanceEnumerationConverter Inheritance Object
Implements Converter

Converts to Enumeration instances. Since AS3 does not have builtin enum types this corresponds to a "faked enum" pattern. The target class should only contain public const declarations which hold instances of that class. If a String value is the source value of type conversion it is interpreted as the name of one of the constants of the enumeration type.



Public Methods
 MethodDefined By
  
Creates a new Converter instance.
EnumerationConverter
  
convert(value:*, domain:ApplicationDomain = null):*
Converts the specified value to the target type this Converter is implemented for.
EnumerationConverter
Constructor Detail
EnumerationConverter()Constructor
public function EnumerationConverter(type:ClassInfo)

Creates a new Converter instance.

Parameters
type:ClassInfo
Method Detail
convert()method
public function convert(value:*, domain:ApplicationDomain = null):*

Converts the specified value to the target type this Converter is implemented for. Implementations should return the value unchanged if it is already of the target type.

Parameters

value:* — the value to be converted
 
domain:ApplicationDomain (default = null) — the domain to use for reflection (only used by some converter implementations)

Returns
* — the converted value