| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> T | Returns: the converted valuethe evaluation context that may define a type converter context, TypedValue the value to convert and a type descriptor describing it typedValue, Class<T> the type to attempt conversion to targetType)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. |
| private static <T> T | |
| public static boolean | toBoolean(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a boolean using the supplied type converter. |
| public static byte | toByte(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a byte using the supplied type converter. |
| public static char | toChar(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a char using the supplied type converter. |
| public static double | toDouble(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a double using the supplied type converter. |
| public static float | toFloat(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a float using the supplied type converter. |
| public static int | toInt(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to an int using the supplied type converter. |
| public static long | toLong(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a long using the supplied type converter. |
| public static short | toShort(TypeConverter typeConverter, TypedValue typedValue)
Attempt to convert a typed value to a short using the supplied type converter. |
| ExpressionUtils | back to summary |
|---|---|
| public ExpressionUtils() | |
| convertTypedValue | back to summary |
|---|---|
| public static <T> T convertTypedValue(EvaluationContext context, TypedValue typedValue, Class<T> targetType) 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.
| |
| convertValue | back to summary |
|---|---|
private static <T> T convertValue(TypeConverter typeConverter, TypedValue typedValue, Class<T> targetType)
| |
| toBoolean | back to summary |
|---|---|
| public static boolean toBoolean(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a boolean using the supplied type converter. | |
| toByte | back to summary |
|---|---|
| public static byte toByte(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a byte using the supplied type converter. | |
| toChar | back to summary |
|---|---|
| public static char toChar(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a char using the supplied type converter. | |
| toDouble | back to summary |
|---|---|
| public static double toDouble(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a double using the supplied type converter. | |
| toFloat | back to summary |
|---|---|
| public static float toFloat(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a float using the supplied type converter. | |
| toInt | back to summary |
|---|---|
| public static int toInt(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to an int using the supplied type converter. | |
| toLong | back to summary |
|---|---|
| public static long toLong(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a long using the supplied type converter. | |
| toShort | back to summary |
|---|---|
| public static short toShort(TypeConverter typeConverter, TypedValue typedValue) Attempt to convert a typed value to a short using the supplied type converter. | |