Package org.mvel2

Class 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 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.
      • main

        public static void main​(String[] args)