VariableResolver (Java EE 5)

Java EE API


javax.servlet.jsp.el Interface VariableResolver


Deprecated. As of JSP 2.1, replaced by ELResolver


此类用于自定义 ExpressionEvaluator 在求值时解析变量引用的方式。例如,此类的实例可以实现其自己的变量查找机制,或者引入重写任何其他变量的“隐式变量”的概念。此类的实例应该在对表达式求值时传递。

此类的实例包含解析发生时将要依赖的上下文

英文文档:

public interface VariableResolver

This class is used to customize the way an ExpressionEvaluator resolves variable references at evaluation time. For example, instances of this class can implement their own variable lookup mechanisms, or introduce the notion of "implicit variables" which override any other variables. An instance of this class should be passed when evaluating an expression.

An instance of this class includes the context against which resolution will happen

Since:
JSP 2.0

Method Summary
 Object
 

Method Detail

public Object resolveVariable(String pName) throws ELException
解析指定变量。如果未找到变量,则返回 null。
pName 要解析的变量的名称
return 变量解析的结果
ThrowsELException: 如果试图解析给定变量时发生失败
英文文档:

resolveVariable

Object resolveVariable(String pName)
                       throws ELException
Deprecated. 
Resolves the specified variable. Returns null if the variable is not found.

Parameters:
pName - the name of the variable to resolve
Returns:
the result of the variable resolution
Throws:
ELException - if a failure occurred while trying to resolve the given variable


Submit a bug or feature

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

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

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