Packageorg.spicefactory.lib.reflect
Interfacepublic interface Converter
ImplementorsBooleanConverter, ClassConverter, ClassInfoConverter, DateConverter, EnumerationConverter, IntConverter, NumberConverter, StringConverter, UintConverter

Interface to be implemented by objects responsible for any necessary type conversion. Instances implementing this interface will be registered with Type.addConverter and will be used in Parameter and Property instances to convert method parameters or property values if they do not match the required target type. Spicelib contains several builtin Converters for some of the top level types like Boolean, String, Number or Date. Applications can register additional Converters as required. Usually a single implementation is responsible for converting to one specific target type like Date.



Public Methods
 MethodDefined by
  
convert(value:*):*
Converts the specified value to the target type this Converter is implemented for.
Converter
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

Throws
ConversionError — if conversion failed