org.xwiki.properties.converter
Interface Converter<T>

Type Parameters:
T - the type in which the provided value has to be converted
All Known Implementing Classes:
AbstractCollectionConverter, AbstractConverter, AbstractSetConverter

@Role
public interface Converter<T>

Converter provided value in the provided target type.

The type supported by the converted is indicated in its role.

For example:

 @Component
 public class IntegerConverter implements Converter<java.lang.Integer>
 

When something goes wrong a Converter can throw a ConversionException.

Since:
2.0M2
Version:
$Id: 2970896004e4f0ef74b793fe43a1eab44452eb35 $

Method Summary
<G> G
convert(Type targetType, Object sourceValue)
           
 

Method Detail

convert

<G> G convert(Type targetType,
              Object sourceValue)
Type Parameters:
G - the type in which the provided value has to be converted
Parameters:
targetType - the type in which the provided value has to be converted
sourceValue - the value to convert
Returns:
the converted value
Since:
3.0M1


Copyright © 2004-2013 XWiki. All Rights Reserved.