Package org.mvel2.conversion
Class ArrayHandler
java.lang.Object
org.mvel2.conversion.ArrayHandler
- All Implemented Interfaces:
ConversionHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canConvertFrom
(Class cls) This method is used to indicate to the runtime whehter or not the handler knows how to convert from the specified type.convertFrom
(Object in) Converts the passed argument to the type represented by the handler.private static Object
handleLooseTypeConversion
(Class sourceType, Object input, Class targetType) Messy method to handle primitive boxing for conversion.
-
Field Details
-
type
-
-
Constructor Details
-
ArrayHandler
-
-
Method Details
-
convertFrom
Description copied from interface:ConversionHandler
Converts the passed argument to the type represented by the handler.- Specified by:
convertFrom
in interfaceConversionHandler
- Parameters:
in
- - the input type- Returns:
- - the converted type
-
canConvertFrom
Description copied from interface:ConversionHandler
This method is used to indicate to the runtime whehter or not the handler knows how to convert from the specified type.- Specified by:
canConvertFrom
in interfaceConversionHandler
- Parameters:
cls
- - the source type- Returns:
- - true if the converter supports converting from the specified type.
-
handleLooseTypeConversion
Messy method to handle primitive boxing for conversion. If someone can re-write this more elegantly, be my guest.- Parameters:
sourceType
-input
-targetType
-- Returns:
-