public class ELFactory extends Object implements ExpressionFactory
FEATURE_CLASS, FEATURE_FUNCTION| Constructor and Description |
|---|
ELFactory() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(XelContext xelc,
String expression,
Class expectedType)
Evaluates an expression.
|
boolean |
isSupported(int feature)
Returns whether an feature is supported.
|
Expression |
parseExpression(XelContext xelc,
String expression,
Class expectedType)
Prepares (a.k.a., compiles) an expression.
|
public boolean isSupported(int feature)
ExpressionFactoryisSupported in interface ExpressionFactoryfeature - which feature to query.
It can be a combination of ExpressionFactory.FEATURE_FUNCTION
and ExpressionFactory.FEATURE_CLASS.public Expression parseExpression(XelContext xelc, String expression, Class expectedType) throws XelException
ExpressionFactoryparseExpression in interface ExpressionFactoryxelc - the context information to prepare the expression.
It can be null, in which case no functions are supported for this
invocation.expression - the expression to be evaluated.expectedType - the expected type of the result of the evaluationXelExceptionpublic Object evaluate(XelContext xelc, String expression, Class expectedType) throws XelException
ExpressionFactoryevaluate in interface ExpressionFactoryxelc - the context information to evaluate an expression.
It can be null, in which case no functions are supported for this
invocation.expression - the expression to be evaluated.
Note: the expression is enclosed
with ${ and }, regardless of what implementation is used.expectedType - the expected type of the result of the evaluationXelExceptionCopyright © 2018. All rights reserved.