Top Description Methods
org.springframework.core.convert.converter

public Interface ConverterFactory<S, R>

Known Direct Implementers
org.springframework.core.convert.support.CharacterToNumberFactory, org.springframework.core.convert.support.StringToEnumConverterFactory, org.springframework.core.convert.support.StringToNumberConverterFactory, org.springframework.core.convert.support.IntegerToEnumConverterFactory, org.springframework.core.convert.support.NumberToNumberConverterFactory
Type Parameters
<S>
the source type converters created by this factory can convert from
<R>
the target range (or base) type converters created by this factory can convert to; for example Number for a set of number subtypes.

A factory for "ranged" converters that can convert objects from S to subtypes of R.

Implementations may additionally implement ConditionalConverter.

Author
Keith Donald
Since
3.0
See Also
ConditionalConverter

Method Summary

Modifier and TypeMethod and Description
public <
the target type
T extends R
>
Converter<S, T>

Returns:

a converter from S to T
getConverter
(Class<T>
the target type to convert to
targetType
)

Get the converter to convert from S to target type T, where T is also an instance of R.

Method Detail

getConverterback to summary
public <T extends R> Converter<S, T> getConverter(Class<T> targetType)

Get the converter to convert from S to target type T, where T is also an instance of R.

Parameters
<T>
the target type
targetType:Class<T>

the target type to convert to

Returns:Converter<S, T>

a converter from S to T