org.mvel2
Class DataConversion
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataConversion
public DataConversion()
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.