org.ow2.opensuit.cel
Interface ITypeConverter

All Known Implementing Classes:
StrictTypeConverter

public interface ITypeConverter

Interface for types conversion

Version:
1.0
Author:
Adrien Ruffie / Pierre Smeyers, http://opensuit.ow2.org/

Method Summary
<T> T
convert(java.lang.Object value, java.lang.Class<T> type)
          Convert the given input value to the specified target type.
 boolean isConvertible(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)
          Determines whether the source type can be converted to the target type.
 

Method Detail

isConvertible

boolean isConvertible(java.lang.Class<?> sourceType,
                      java.lang.Class<?> targetType)
Determines whether the source type can be converted to the target type.

Parameters:
sourceType - The source type which should be converted
targetType - The targeted type by the conversion
Returns:
boolean

convert

<T> T convert(java.lang.Object value,
              java.lang.Class<T> type)
          throws java.lang.Exception
Convert the given input value to the specified target type.

Type Parameters:
T - type The targeted type of the conversion
Parameters:
value - The given input value which should be converted
Returns:
the targeted type of the conversion
Throws:
java.lang.Exception


Copyright © 2008-2010 eBMWebsourcing. All Rights Reserved.