org.xwiki.properties.internal
Class DefaultConverterManager

java.lang.Object
  extended by 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:

Since:
2.0M2
Version:
$Id$

Constructor Summary
DefaultConverterManager()
           
 
Method Summary
<T> T
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
 

Constructor Detail

DefaultConverterManager

public DefaultConverterManager()
Method Detail

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 converted
value - 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.