Package org.mvel2
Interface ConversionHandler
-
- All Known Subinterfaces:
Unit
- All Known Implementing Classes:
ArrayCH
,ArrayHandler
,BigDecimalCH
,BigIntegerCH
,BooleanCH
,ByteCH
,CharArrayCH
,CharCH
,CompositeCH
,DoubleCH
,FloatCH
,IntArrayCH
,IntegerCH
,ListCH
,LongCH
,ObjectCH
,PrimIntArrayCH
,SetCH
,ShortCH
,StringArrayCH
,StringCH
,UnitConversion
public interface ConversionHandler
The conversion handler interface defines the basic interface for implementing conversion handlers in MVEL.- See Also:
DataConversion
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canConvertFrom(java.lang.Class cls)
This method is used to indicate to the runtime whehter or not the handler knows how to convert from the specified type.java.lang.Object
convertFrom(java.lang.Object in)
Converts the passed argument to the type represented by the handler.
-
-
-
Method Detail
-
convertFrom
java.lang.Object convertFrom(java.lang.Object in)
Converts the passed argument to the type represented by the handler.- Parameters:
in
- - the input type- Returns:
- - the converted type
-
canConvertFrom
boolean canConvertFrom(java.lang.Class cls)
This method is used to indicate to the runtime whehter or not the handler knows how to convert from the specified type.- Parameters:
cls
- - the source type- Returns:
- - true if the converter supports converting from the specified type.
-
-