abstract class ExpressionUtils
Common utility functions that may be used by any Expression Language provider.
Author
Andy Clement
Author
Juergen Hoeller
Since
3.0
ExpressionUtils()
Common utility functions that may be used by any Expression Language provider. |
open static fun <T : Any> convertTypedValue(context: EvaluationContext, typedValue: TypedValue, targetType: Class<T>): T
Determines if there is a type converter available in the specified context and attempts to use it to convert the supplied value to the specified type. Throws an exception if conversion is not possible. |
|
open static fun toBoolean(typeConverter: TypeConverter, typedValue: TypedValue): Boolean
Attempt to convert a typed value to a boolean using the supplied type converter. |
|
open static fun toByte(typeConverter: TypeConverter, typedValue: TypedValue): Byte
Attempt to convert a typed value to a byte using the supplied type converter. |
|
open static fun toChar(typeConverter: TypeConverter, typedValue: TypedValue): Char
Attempt to convert a typed value to a char using the supplied type converter. |
|
open static fun toDouble(typeConverter: TypeConverter, typedValue: TypedValue): Double
Attempt to convert a typed value to a double using the supplied type converter. |
|
open static fun toFloat(typeConverter: TypeConverter, typedValue: TypedValue): Float
Attempt to convert a typed value to a float using the supplied type converter. |
|
open static fun toInt(typeConverter: TypeConverter, typedValue: TypedValue): Int
Attempt to convert a typed value to an int using the supplied type converter. |
|
open static fun toLong(typeConverter: TypeConverter, typedValue: TypedValue): Long
Attempt to convert a typed value to a long using the supplied type converter. |
|
open static fun toShort(typeConverter: TypeConverter, typedValue: TypedValue): Short
Attempt to convert a typed value to a short using the supplied type converter. |