public class ExpressionInspector extends Object
Constructor and Description |
---|
ExpressionInspector() |
Modifier and Type | Method and Description |
---|---|
static MethodReference |
getMethodReference(ELContext context,
ValueExpression valueExpression)
Gets a MethodReference from a ValueExpression.
|
static ValueReference |
getValueReference(ELContext context,
ValueExpression valueExpression)
Gets the ValueReference from a ValueExpression, without any checks whether the property is actually
a property or if it isn't a "MethodSuffix".
|
public static ValueReference getValueReference(ELContext context, ValueExpression valueExpression)
This is also a workaround for the fact that a ValueReference can't be obtained from a TagValueExpression in JSF 2.x (since it doesn't implement getValueReference and its super class just returns null).
context
- the context of this evaluationvalueExpression
- the value expression being evaluatedpublic static MethodReference getMethodReference(ELContext context, ValueExpression valueExpression)
Note that in case the expression refers to a method, the method reference contains the method with the name the expression refers to, with a matching number of arguments and a match of types. Overloads with the same amount of parameters are supported, but if the actual arguments match with the types of multiple overloads (e.g. actual argument Long, overloads for Number and Long) a random method will be chosen.
context
- the context of this evaluationvalueExpression
- the value expression being evaluatedCopyright © 2012–2014 OmniFaces. All rights reserved.