org.mvel2
Class DataConversion

java.lang.Object
  extended by org.mvel2.DataConversion

public class DataConversion
extends Object

The DataConversion factory is where all of MVEL's type converters are registered with the runtime.

Author:
Mike Brock
See Also:
ConversionHandler

Constructor Summary
DataConversion()
           
 
Method Summary
static void addConversionHandler(Class type, ConversionHandler handler)
          Register a new ConversionHandler with the factory.
static boolean canConvert(Class toType, Class convertFrom)
           
static
<T> T
convert(Object in, Class<T> toType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataConversion

public DataConversion()
Method Detail

canConvert

public static boolean canConvert(Class toType,
                                 Class convertFrom)

convert

public static <T> T convert(Object in,
                            Class<T> toType)

addConversionHandler

public static void addConversionHandler(Class type,
                                        ConversionHandler handler)
Register a new ConversionHandler with the factory.

Parameters:
type - - Target type represented by the conversion handler.
handler - - An instance of the handler.


Copyright © 2011. All Rights Reserved.