|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.xel.zel.ELFactory
public class ELFactory
An XEL ExpressionFactory implementation based on ZEL ExpressionFactory.
Field Summary | |
---|---|
protected ExpressionFactory |
_expf
|
Fields inherited from interface org.zkoss.xel.ExpressionFactory |
---|
FEATURE_CLASS, FEATURE_FUNCTION |
Constructor Summary | |
---|---|
ELFactory()
|
Method Summary | |
---|---|
java.lang.Object |
evaluate(XelContext xelc,
java.lang.String expression,
java.lang.Class expectedType)
Evaluates an expression. |
boolean |
isSupported(int feature)
Returns whether an feature is supported. |
protected ELContext |
newELContext(XelContext xelc)
|
protected ExpressionFactory |
newExpressionFactory()
Returns the EL expression factory. |
Expression |
parseExpression(XelContext xelc,
java.lang.String expression,
java.lang.Class expectedType)
Prepares (aka., compiles) an expression. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final ExpressionFactory _expf
Constructor Detail |
---|
public ELFactory()
Method Detail |
---|
public boolean isSupported(int feature)
ExpressionFactory
isSupported
in interface ExpressionFactory
feature
- which feature to query.
It can be a combination of ExpressionFactory.FEATURE_FUNCTION
and ExpressionFactory.FEATURE_CLASS
.public Expression parseExpression(XelContext xelc, java.lang.String expression, java.lang.Class expectedType) throws XelException
ExpressionFactory
parseExpression
in interface ExpressionFactory
xelc
- the context infomation 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
public java.lang.Object evaluate(XelContext xelc, java.lang.String expression, java.lang.Class expectedType) throws XelException
ExpressionFactory
evaluate
in interface ExpressionFactory
xelc
- 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 }, regardingless what implemetnation is used.expectedType
- the expected type of the result of the evaluation
XelException
protected ELContext newELContext(XelContext xelc)
protected ExpressionFactory newExpressionFactory()
Default: Use org.zkoss.zel.impl.ExpressionFactoryImpl.
You might override it to use a different implementation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |