public final class JsfExpressionUtil extends Object
Modifier and Type | Method and Description |
---|---|
static javax.faces.event.MethodExpressionActionListener |
createMethodExpressionActionListener(String stringMethodExpression)
Creates a MethodExpressionActionListener from the supplied stringMethodExpression.
|
static javax.el.ValueExpression |
createValueExpression(String expression,
Class<?> expectedType)
Creates a value expression, where the expression uses the "Unified Expression Language".
|
static <T> T |
evaluateExpressionCall(String expression,
Class<T> expectedReturnType,
Class<?>[] parameterTypes,
Object[] parameterValues)
Evaluates a method call value expression, where the expression uses the "Unified Expression Language".
|
static <T> T |
evaluateExpressionGet(String expression,
Class<T> expectedType)
Evaluates a get value expression, where the expression uses the "Unified Expression Language".
|
static <T> void |
evaluateExpressionSet(String expression,
Class<T> expectedType,
T value)
Evaluates a set value expression, where the expression uses the "Unified Expression Language".
|
public static javax.el.ValueExpression createValueExpression(String expression, Class<?> expectedType)
expression
- The expression to evaluate.expectedType
- The expected type of the supplied expression.javax.el.ELException
- When the supplied expression is invalid.IllegalArgumentException
- When the supplied expression is empty.NullPointerException
- When either the supplied expression or expectedType is null.public static <T> T evaluateExpressionGet(String expression, Class<T> expectedType)
T
- Type of the expression.expression
- The expression to evaluate.
expectedType
- The expected type of the supplied expression.javax.el.ELException
- When the supplied expression is invalid.IllegalArgumentException
- When the supplied expression is empty.NullPointerException
- When either the supplied expression or expectedType is null.public static <T> void evaluateExpressionSet(String expression, Class<T> expectedType, T value)
T
- Type of the expression.expression
- The expression to evaluate.
expectedType
- The expected type of the supplied expression.value
- The value to set.javax.el.ELException
- When the supplied expression is invalid.IllegalArgumentException
- When the supplied expression is empty.NullPointerException
- When either the supplied expression or expectedType is null.public static <T> T evaluateExpressionCall(String expression, Class<T> expectedReturnType, Class<?>[] parameterTypes, Object[] parameterValues)
T
- Type of the expression.expression
- The method call expression to evaluate.
expectedReturnType
- The expected return type of the called method.parameterTypes
- The parameter types.parameterValues
- The parameter values.javax.el.ELException
- When the supplied expression is invalid.NullPointerException
- When either the supplied expression or expectedReturnType is null.public static javax.faces.event.MethodExpressionActionListener createMethodExpressionActionListener(String stringMethodExpression)
stringMethodExpression
- The method expression to create a MethodExpressionActionListener from.
IllegalArgumentException
- When the supplied stringMethodExpression is empty.NullPointerException
- When the supplied stringMethodExpression is null.Copyright © 2008–2018. All rights reserved.