|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExpressionFactory
Used to prepare expressions (Expression
).
Field Summary | |
---|---|
static int |
FEATURE_CLASS
Used with isSupported(int) to know whether the factory
supports FunctionMapperExt.resolveClass(java.lang.String) |
static int |
FEATURE_FUNCTION
Used with isSupported(int) to know whether the factory
supports FunctionMapper.resolveFunction(java.lang.String, java.lang.String) |
Method Summary | |
---|---|
java.lang.Object |
evaluate(XelContext ctx,
java.lang.String expression,
java.lang.Class<?> expectedType)
Evaluates an expression. |
boolean |
isSupported(int feature)
Returns whether an feature is supported. |
Expression |
parseExpression(XelContext ctx,
java.lang.String expression,
java.lang.Class<?> expectedType)
Prepares (a.k.a., compiles) an expression. |
Field Detail |
---|
static final int FEATURE_FUNCTION
isSupported(int)
to know whether the factory
supports FunctionMapper.resolveFunction(java.lang.String, java.lang.String)
static final int FEATURE_CLASS
isSupported(int)
to know whether the factory
supports FunctionMapperExt.resolveClass(java.lang.String)
Method Detail |
---|
boolean isSupported(int feature)
feature
- which feature to query.
It can be a combination of FEATURE_FUNCTION
and FEATURE_CLASS
.Expression parseExpression(XelContext ctx, java.lang.String expression, java.lang.Class<?> expectedType) throws XelException
ctx
- 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 evaluation
XelException
java.lang.Object evaluate(XelContext ctx, java.lang.String expression, java.lang.Class<?> expectedType) throws XelException
ctx
- 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 evaluation
XelException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |