org.springframework.core.convert.support
Interface GenericConverter


public interface GenericConverter

Uniform converter interface as returned from GenericConversionService.getConverter(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor).

This interface is primarily an internal detail of the GenericConversionService implementation. It should generally not be implemented by application code directly. See Converter and ConverterFactory interfaces for simpler public converter SPIs.

Since:
3.0
Author:
Keith Donald
See Also:
Converter, ConverterFactory, GenericConversionService

Method Summary
 Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
          Convert the source to the targetType described by the TypeDescriptor.
 

Method Detail

convert

Object convert(Object source,
               TypeDescriptor sourceType,
               TypeDescriptor targetType)
Convert the source to the targetType described by the TypeDescriptor.

Parameters:
source - the source object to convert (never null)
sourceType - context about the source type to convert from
targetType - context about the target type to convert to
Returns:
the converted object