Evaluates the given EL expression and returns the result coerced to the expected type. The expression is automatically wrapped in {@literal ${}} delimiters before evaluation. @param the expected result type @param expression the EL expression to evaluate @param expectedType the
(String expression, Class<T> expectedType)
| 95 | * @throws ELException if the expression cannot be evaluated |
| 96 | */ |
| 97 | public <T> T getValue(String expression, Class<T> expectedType) { |
| 98 | ValueExpression ve = factory.createValueExpression(context, bracket(expression), expectedType); |
| 99 | return ve.getValue(context); |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Evaluates the given EL expression and sets the result to the specified value. |