Expression (Java EE 5)

Java EE API


javax.servlet.jsp.el Class Expression

java.lang.Object
  extended by javax.servlet.jsp.el.Expression

Deprecated. As of JSP 2.1, replaced by ValueExpression


用于已准备好的表达式的抽象类。

Expression 实例可通过 ExpressionEvaluator 实例获得。

Expression 可能已经对表达式进行了语法解析,也可能还没有这么做。调用 evaluate() 方法的客户端应该准备好应对引发 ELParseException 异常的情况。

英文文档:

public abstract class Expression
extends Object

The abstract class for a prepared expression.

An instance of an Expression can be obtained via from an ExpressionEvaluator instance.

An Expression may or not have done a syntactic parse of the expression. A client invoking the evaluate() method should be ready for the case where ELParseException exceptions are raised.

Since:
JSP 2.0

Constructor Summary
 
Method Summary
abstract  Object
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public Expression()
英文文档:

Expression

public Expression()
Deprecated. 
Method Detail

abstract public Object evaluate(VariableResolver vResolver) throws ELException
对以前准备好的表达式求值。在某些实现中,准备表达式需要进行完整的语法验证,但在其他实现中可能不需要这样做。因为是运行时求值,所以对表达式求值可能引发 ELParseException 和其他 ELException。
vResolver 一个 VariableResolver 实例,可在运行时使用它将隐式对象的名称解析为 Objects。
return 表达式求值的结果。
ThrowsELException: 如果表达式求值失败,则抛出此异常。
英文文档:

evaluate

public abstract Object evaluate(VariableResolver vResolver)
                         throws ELException
Deprecated. 
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.

Parameters:
vResolver - A VariableResolver instance that can be used at runtime to resolve the name of implicit objects into Objects.
Returns:
The result of the expression evaluation.
Throws:
ELException - Thrown if the expression evaluation failed.


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!