org.xwiki.properties.internal
Class DefaultConverterManager
java.lang.Object
org.xwiki.properties.internal.DefaultConverterManager
- All Implemented Interfaces:
- ConverterManager
@Component
@Singleton
public class DefaultConverterManager
- extends Object
- implements ConverterManager
Default implementation for ConverterManager.
It try to find a Converter for the provided target type. If it can't find:
- if the type is an
Enum, it use the Converter with component hint "enum"
- then it use the default
Converter (which is based on ConvertUtils by
default)
- Since:
- 2.0M2
- Version:
- $Id$
|
Method Summary |
|
convert(Type targetType,
Object value)
Convert provided value into the provided target type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConverterManager
public DefaultConverterManager()
convert
public <T> T convert(Type targetType,
Object value)
- Convert provided value into the provided target type.
- Specified by:
convert in interface ConverterManager
- 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 convertedvalue - the value to convert
- Returns:
- the converted value
- See Also:
ConverterManager.convert(java.lang.reflect.Type, java.lang.Object)
Copyright © 2004-2011 XWiki. All Rights Reserved.