Package 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.
See Also:
  • Field Details

  • Constructor Details

    • DataConversion

      public DataConversion()
  • Method Details

    • 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)