Packageorg.spicefactory.lib.reflect.converter
Classpublic class EnumerationConverter
ImplementsConverter

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:*):*
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:*):*

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

Returns
* — the converted value