本文整理汇总了Java中org.apache.jasper.el.ELContextImpl.setFunctionMapper方法的典型用法代码示例。如果您正苦于以下问题:Java ELContextImpl.setFunctionMapper方法的具体用法?Java ELContextImpl.setFunctionMapper怎么用?Java ELContextImpl.setFunctionMapper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jasper.el.ELContextImpl
的用法示例。
在下文中一共展示了ELContextImpl.setFunctionMapper方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prepareExpression
import org.apache.jasper.el.ELContextImpl; //导入方法依赖的package包/类
private void prepareExpression(ELNode.Nodes el, Node n, String expr)
throws JasperException {
validateFunctions(el, n);
// test it out
ELContextImpl ctx = new ELContextImpl();
ctx.setFunctionMapper(this.getFunctionMapper(el));
ExpressionFactory ef = this.pageInfo.getExpressionFactory();
try {
ef.createValueExpression(ctx, expr, Object.class);
} catch (ELException e) {
}
}
示例2: evaluateExpression
import org.apache.jasper.el.ELContextImpl; //导入方法依赖的package包/类
private String evaluateExpression(String expression) {
ELContextImpl ctx = new ELContextImpl();
ctx.setFunctionMapper(new FMapper());
ExpressionFactoryImpl exprFactory = new ExpressionFactoryImpl();
ValueExpression ve = exprFactory.createValueExpression(ctx, expression,
String.class);
return (String) ve.getValue(ctx);
}
示例3: evalAttr
import org.apache.jasper.el.ELContextImpl; //导入方法依赖的package包/类
private String evalAttr(String expression, char quote) {
ELContextImpl ctx = new ELContextImpl();
ctx.setFunctionMapper(new FMapper());
ExpressionFactoryImpl exprFactory = new ExpressionFactoryImpl();
ValueExpression ve = exprFactory.createValueExpression(ctx,
AttributeParser.getUnquoted(expression, quote, false, false,
false, false),
String.class);
return (String) ve.getValue(ctx);
}
示例4: prepareExpression
import org.apache.jasper.el.ELContextImpl; //导入方法依赖的package包/类
private void prepareExpression(ELNode.Nodes el, Node n, String expr) throws JasperException {
validateFunctions(el, n);
// test it out
ELContextImpl ctx = new ELContextImpl();
ctx.setFunctionMapper(this.getFunctionMapper(el));
ExpressionFactory ef = this.pageInfo.getExpressionFactory();
try {
ef.createValueExpression(ctx, expr, Object.class);
} catch (ELException e) {
}
}