com.bstek.dorado.core.el
public abstract class AbstractExpression extends java.lang.Object implements Expression, ExpressionHandlerAware
| Modifier and Type | Field and Description |
|---|---|
protected ExpressionHandler |
elHandler
EL表达式的处理器。
|
| Constructor and Description |
|---|
AbstractExpression() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evaluate()
对表达式进行求值,返回其结果。
|
EvaluateMode |
getEvaluateMode() |
protected org.apache.commons.jexl2.JexlContext |
getJexlContext()
返回一个Jexl的上下文对象。
|
protected abstract java.lang.Object |
internalEvaluate()
内部的执行Jexl表达式的方法。
|
protected java.lang.Object |
internalEvaluateExpression(org.apache.commons.jexl2.Expression expression,
org.apache.commons.jexl2.JexlContext context)
内部的执行Jexl表达式的方法。
如果返回的结果值仍是一个表达式,将进一步对该表达式进行求值。 |
void |
setEvaluateMode(EvaluateMode evaluateMode) |
void |
setExpressionHandler(ExpressionHandler elHandler)
设置EL表达式的处理器。
|
protected ExpressionHandler elHandler
public void setExpressionHandler(ExpressionHandler elHandler)
ExpressionHandlerAwaresetExpressionHandler in interface ExpressionHandlerAwarepublic EvaluateMode getEvaluateMode()
getEvaluateMode in interface Expressionpublic void setEvaluateMode(EvaluateMode evaluateMode)
protected org.apache.commons.jexl2.JexlContext getJexlContext()
由于Dorado内部通过apache提供的JEXL通过包来实现EL表达式的解析和求值等操作, 因此在对EL表达式进行求值前需要首先获得一个有效的Jexl上下文对象。
public final java.lang.Object evaluate()
Expressionevaluate in interface Expressionprotected abstract java.lang.Object internalEvaluate()
protected java.lang.Object internalEvaluateExpression(org.apache.commons.jexl2.Expression expression,
org.apache.commons.jexl2.JexlContext context)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2001-2011 www.BSTEK.com All Rights Reserved.