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 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)
|
ReturnsThrows
Mon Feb 6 2012, 01:04 AM +01:00