ExpressionEvaluatorImplpublic class ExpressionEvaluatorImpl extends javax.servlet.jsp.el.ExpressionEvaluator This is the implementation of ExpreesioEvaluator
using implementation of JSP2.1. |
Fields Summary |
---|
private javax.servlet.jsp.PageContext | pageContext |
Methods Summary |
---|
public java.lang.Object | evaluate(java.lang.String expression, java.lang.Class expectedType, javax.servlet.jsp.el.VariableResolver vResolver, javax.servlet.jsp.el.FunctionMapper fMapper)
ELContextImpl elContext;
if (vResolver instanceof VariableResolverImpl) {
elContext = (ELContextImpl) pageContext.getELContext();
}
else {
// The provided variable Resolver is a custom resolver,
// wrap it with a ELResolver
elContext = new ELContextImpl(new ELResolverWrapper(vResolver));
}
javax.el.FunctionMapper fm = new FunctionMapperWrapper(fMapper);
elContext.setFunctionMapper(fm);
ExpressionFactory fac = ExpressionFactory.newInstance();
Object value;
try {
ValueExpression expr = fac.createValueExpression(
elContext,
expression,
expectedType);
value = expr.getValue(elContext);
} catch (javax.el.ELException ex) {
throw new ELException(ex);
}
return value;
| public javax.servlet.jsp.el.Expression | parseExpression(java.lang.String expression, java.lang.Class expectedType, javax.servlet.jsp.el.FunctionMapper fMapper)
ExpressionFactory fac = ExpressionFactory.newInstance();
javax.el.ValueExpression expr;
ELContextImpl elContext = new ELContextImpl(null);
javax.el.FunctionMapper fm = new FunctionMapperWrapper(fMapper);
elContext.setFunctionMapper(fm);
try {
expr = fac.createValueExpression(
elContext,
expression, expectedType);
} catch (javax.el.ELException ex) {
throw new ELException(ex);
}
return new ExpressionImpl(expr, pageContext);
|
|