org.xwiki.properties.converter
Interface Converter

All Known Implementing Classes:
AbstractCollectionConverter, AbstractConverter

@Role
public interface Converter

Converter provided value in the provided target type.

The role of this component is supposed to be the supported target types. For example:

 @Component("java.lang.Integer")
 public class IntegerConverter implements Converter
 

When something goes wrong a Converter can throw a ConversionException.

Since:
2.0M2
Version:
$Id: b439af5c8e4c7ab36a5daba5cd41efe5a95c5d5d $

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

Method Detail

convert

<T> T convert(Type targetType,
              Object sourceValue)
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
sourceValue - the value to convert
Returns:
the converted value
Since:
3.0M1


Copyright © 2004-2013 XWiki. All Rights Reserved.