com.bstek.dorado.core.el
public class DefaultExpressionHandler extends java.lang.Object implements ExpressionHandler
Constructor and Description |
---|
DefaultExpressionHandler() |
Modifier and Type | Method and Description |
---|---|
Expression |
compile(java.lang.String text)
编译一段文本。如果该段文本中包含有EL表达式则返回一个EL表达式的描述对象,否则返回null。
|
protected static java.lang.Object |
createDoradoExpressionUtilsBean(java.util.Map<java.lang.String,java.lang.reflect.Method> utilMethods) |
protected Expression |
createExpression(java.util.List<java.lang.Object> sections,
EvaluateMode evaluateMode)
根据与解析的结果创建具体的表达式对象。
|
java.util.List<ContextVarsInitializer> |
getContextInitializers()
返回所有的隐式变量初始化器。
|
org.apache.commons.jexl2.JexlContext |
getJexlContext()
返回一个Jexl的上下文对象。
|
org.apache.commons.jexl2.JexlEngine |
getJexlEngine() |
void |
setContextInitializers(java.util.List<ContextVarsInitializer> contextInitializers)
设置所有的隐式变量初始化器。
|
public void setContextInitializers(java.util.List<ContextVarsInitializer> contextInitializers)
public java.util.List<ContextVarsInitializer> getContextInitializers()
public Expression compile(java.lang.String text)
ExpressionHandler
compile
in interface ExpressionHandler
text
- 要编译的文本。protected Expression createExpression(java.util.List<java.lang.Object> sections, EvaluateMode evaluateMode)
sections
- evaluateMode
- public org.apache.commons.jexl2.JexlEngine getJexlEngine() throws java.lang.Exception
getJexlEngine
in interface ExpressionHandler
java.lang.Exception
public org.apache.commons.jexl2.JexlContext getJexlContext()
ExpressionHandler
由于Dorado内部通过apache提供的JEXL通过包来实现EL表达式的解析和求值等操作, 因此在对EL表达式进行求值前需要首先获得一个有效的Jexl上下文对象。
getJexlContext
in interface ExpressionHandler
protected static java.lang.Object createDoradoExpressionUtilsBean(java.util.Map<java.lang.String,java.lang.reflect.Method> utilMethods) throws java.lang.Exception
java.lang.Exception
Copyright © 2001-2011 www.BSTEK.com All Rights Reserved.