com.greenpineyu.fel
接口 FelEngine

所有已知实现类:
FelEngineImpl

public interface FelEngine

表达式引擎

作者:
yqs

字段摘要
static FelEngine instance
          默认实例
 
方法摘要
 void addFun(Function fun)
          添加函数到用户函数库中(执行表达式时,优先从用户函数库中获取函数)
 Expression compile(String exp, FelContext ctx, Optimizer... opts)
          编译表达式
 Object eval(String exp)
          执行表达式,获取结果
 Object eval(String exp, FelContext ctx)
          使用指定的引擎上下文执行表达式,获取结果
 CompileService getCompiler()
          获取编译器
 FelContext getContext()
           
 FunMgr getFunMgr()
          获取函数管理器
 Parser getParser()
          获取解析器
 SecurityMgr getSecurityMgr()
          返回安全管理器
 FelNode parse(String exp)
          解析表达式为节点
 void setCompiler(CompileService compiler)
          设置编译器
 void setContext(FelContext context)
          设置Context
 void setFunMgr(FunMgr funMgr)
          设置函数管理器
 void setParser(Parser parser)
          设置解析器
 void setSecurityMgr(SecurityMgr mgr)
          设置安全管理器
 

字段详细信息

instance

static final FelEngine instance
默认实例

方法详细信息

eval

Object eval(String exp)
执行表达式,获取结果

参数:
exp -
返回:

eval

Object eval(String exp,
            FelContext ctx)
使用指定的引擎上下文执行表达式,获取结果

参数:
exp -
ctx - 引擎上下文
返回:

parse

FelNode parse(String exp)
解析表达式为节点

参数:
exp -
返回:

compile

Expression compile(String exp,
                   FelContext ctx,
                   Optimizer... opts)
编译表达式

参数:
exp -
ctx -
opts - 编译优化选项
返回:

getContext

FelContext getContext()
返回:
引擎执行环境

addFun

void addFun(Function fun)
添加函数到用户函数库中(执行表达式时,优先从用户函数库中获取函数)

参数:
fun -

getCompiler

CompileService getCompiler()
获取编译器

返回:

setCompiler

void setCompiler(CompileService compiler)
设置编译器

参数:
compiler -

getParser

Parser getParser()
获取解析器

返回:

setParser

void setParser(Parser parser)
设置解析器

参数:
parser -

getFunMgr

FunMgr getFunMgr()
获取函数管理器

返回:

setFunMgr

void setFunMgr(FunMgr funMgr)
设置函数管理器

参数:
funMgr -

setContext

void setContext(FelContext context)
设置Context

参数:
context -

getSecurityMgr

SecurityMgr getSecurityMgr()
返回安全管理器

返回:

setSecurityMgr

void setSecurityMgr(SecurityMgr mgr)
设置安全管理器

参数:
mgr -


Copyright © 2013. All Rights Reserved.