javax.servlet.jsp.el.Expression.evaluate()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(173)

本文整理了Java中javax.servlet.jsp.el.Expression.evaluate()方法的一些代码示例,展示了Expression.evaluate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Expression.evaluate()方法的具体详情如下:
包路径:javax.servlet.jsp.el.Expression
类名称:Expression
方法名:evaluate

Expression.evaluate介绍

[英]Evaluates an expression that was previously prepared. In some implementations preparing an expression involves full syntactic validation, but others may not do so. Evaluating the expression may raise an ELParseException as well as other ELExceptions due to run-time evaluation.
[中]计算先前准备的表达式。在某些实现中,准备表达式需要进行完整的语法验证,但其他实现可能不会这样做。对表达式求值可能会引发ELParseException以及由于运行时求值而引发的其他EleException。

代码示例

代码示例来源:origin: codefollower/Tomcat-Research

@Override
public Object evaluate(String expression,
    @SuppressWarnings("rawtypes") Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: jboss.web/jbossweb

public Object evaluate(String expression, Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: com.caucho/resin

/**
 * Evaluates an expression.
 */
public Object evaluate(String expression, Class expectedType,
            javax.servlet.jsp.el.VariableResolver resolver,
            FunctionMapper funMapper)
 throws javax.servlet.jsp.el.ELException
{
 Expression expr = parseExpression(expression, expectedType, funMapper);
  
 return expr.evaluate(resolver);
}

代码示例来源:origin: org.apache.tomcat/tomcat-jasper

@Override
public Object evaluate(String expression,
    @SuppressWarnings("rawtypes") Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/jasper

@Override
public Object evaluate(String expression,
    @SuppressWarnings("rawtypes") // API does not use generics
    Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: org.seasar.mayaa/mayaa

public Object evaluate(String expression, Class expectedClass,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  Expression exp = parseExpression(expression, expectedClass, fMapper);
  return exp.evaluate(vResolver);
}

代码示例来源:origin: org.jboss.web/jbossweb

public Object evaluate(String expression, Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: io.undertow.jastow/jastow

@Override
public Object evaluate(String expression,
    @SuppressWarnings("rawtypes") Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

@Override
public Object evaluate(String expression,
    @SuppressWarnings("rawtypes") // API does not use generics
    Class expectedType,
    VariableResolver vResolver, FunctionMapper fMapper)
    throws ELException {
  return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}

代码示例来源:origin: org.compass-project/compass

protected Object evaluate(final Object o, ResourcePropertyMapping resourcePropertyMapping) throws ConversionException {
    try {
      VariableResolver variableResolver = new VariableResolver() {
        public Object resolveVariable(String variable) throws ELException {
          return o;
        }
      };
      return expression.evaluate(variableResolver);
    } catch (Exception e) {
      throw new ConversionException("Failed to evaluate [" + o + "] with expression [" + expression + "]", e);
    }
  }
}

代码示例来源:origin: com.bbossgroups/bboss-mvc

expressionCache.put(cacheKey, expr);
return expr.evaluate(pageContext.getVariableResolver());

代码示例来源:origin: org.zkoss.zk/zkmax

public Object evaluate(XelContext ctx) {
  //Test case: B30-1957661.zul where a function mapper is created
  //by zscript so it is different from one page to page
  //In this case, we cannot reuse parsed expression.
  //
  //Note: if nfm is null, we consider it as not-change since DSP
  //doesn't save function mapper when evaluating
  try {
    final FunctionMapper nfm = ctx.getFunctionMapper();
    if (nfm != null && _mapper != nfm)
      return new ApacheELFactory().evaluate(ctx, _rawexpr, _expected);
    final VariableResolver resolver = ctx.getVariableResolver();
    return _expr.evaluate(
      resolver != null ? new XelELResolver(resolver): null);
  } catch (ELException ex) {
    throw new XelException(ex);
  }
}

代码示例来源:origin: net.sourceforge.stripes/stripes

try {
  resolver.setCurrentValue(value);
  Boolean result = (Boolean) expr.evaluate(resolver);
  if (!Boolean.TRUE.equals(result)) {
    ValidationError error = new ScopedLocalizableError(ERROR_DEFAULT_SCOPE,

代码示例来源:origin: StripesFramework/stripes

try {
  resolver.setCurrentValue(value);
  Boolean result = (Boolean) expr.evaluate(resolver);
  if (!Boolean.TRUE.equals(result)) {
    ValidationError error = new ScopedLocalizableError(ERROR_DEFAULT_SCOPE,

相关文章