Package org.xwiki.properties
Interface ConverterManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> T
convert(Type targetType, Object sourceValue)
Convert provided value into the provided target type.default <T> Converter<T>
getConverter(Type targetType)
-
-
-
Method Detail
-
convert
<T> T convert(Type targetType, Object sourceValue)
Convert provided value into the provided target type.- Type Parameters:
T
- the type in which the provided value has to be converted- Parameters:
targetType
- the type in which the provided value has to be convertedsourceValue
- the value to convert- Returns:
- the converted value
- Since:
- 3.0M1
-
getConverter
default <T> Converter<T> getConverter(Type targetType)
- Type Parameters:
T
- the type in which the provided value has to be converted- Parameters:
targetType
- the type for which the converter has been registered- Returns:
- the converter associated to the provided type or null if none could be found
- Since:
- 9.0RC1
-
-