org.ow2.opensuit.cel.util
Class StrictTypeConverter

java.lang.Object
  extended by org.ow2.opensuit.cel.util.StrictTypeConverter
All Implemented Interfaces:
ITypeConverter

public class StrictTypeConverter
extends java.lang.Object
implements ITypeConverter

Type Conversions as described in EL 2.1 specification (section 1.17).


Field Summary
protected static java.lang.Long LONG_ZERO
           
protected static java.util.Map<java.lang.Class<?>,java.lang.Class<?>> WRAPPER_TYPES
           
 
Constructor Summary
StrictTypeConverter()
           
 
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.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LONG_ZERO

protected static final java.lang.Long LONG_ZERO

WRAPPER_TYPES

protected static final java.util.Map<java.lang.Class<?>,java.lang.Class<?>> WRAPPER_TYPES
Constructor Detail

StrictTypeConverter

public StrictTypeConverter()
Method Detail

isConvertible

public boolean isConvertible(java.lang.Class<?> sourceType,
                             java.lang.Class<?> targetType)
Description copied from interface: ITypeConverter
Determines whether the source type can be converted to the target type.

Specified by:
isConvertible in interface ITypeConverter
Parameters:
sourceType - The source type which should be converted
targetType - The targeted type by the conversion
Returns:
boolean

convert

public <T> T convert(java.lang.Object value,
                     java.lang.Class<T> type)
          throws ConversionError
Description copied from interface: ITypeConverter
Convert the given input value to the specified target type.

Specified by:
convert in interface ITypeConverter
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:
ConversionError

main

public static void main(java.lang.String[] args)
                 throws ConversionError
Throws:
ConversionError


Copyright © 2008-2010 eBMWebsourcing. All Rights Reserved.