|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.faces.el Class MethodBinding
java.lang.Object javax.faces.el.MethodBinding
Deprecated. This has been replaced by
MethodExpression
.
MethodBinding 是一个对象,它可以对通过 ValueBinding
对方法绑定表达式的开头部分求值得到的实例调用任意公共方法。通过调用此 Web 应用程序的 javax.faces.application.Application
实例的 createMethodBinding()
方法,可以获得用于特定方法绑定表达式的不可变 MethodBinding
。
deprecated |
由 javax.el.MethodExpression 取代。 |
public abstract class MethodBinding
- extends Object
MethodBinding is an object that can be used
to call an arbitrary public method, on an instance that is acquired by
evaluatng the leading portion of a method binding expression via a
ValueBinding
. An immutable MethodBinding
for a particular
method binding expression can be acquired by calling the
createMethodBinding()
method of the
Application
instance for this web
application.
Constructor Summary | |
---|---|
MethodBinding()
Deprecated. |
Method Summary | |
---|---|
String |
getExpressionString()
Deprecated. Return the (possibly null ) expression String,
with leading and trailing delimiters, from which this
MethodBinding was built. |
abstract Class |
getType(FacesContext context)
Deprecated. Return the Java class representing the return type from the method identified by this method binding expression. |
abstract Object |
invoke(FacesContext context,
Object[] params)
Deprecated. Return the return value (if any) resulting from a call to the method identified by this method binding expression, passing it the specified parameters, relative to the specified FacesContext . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
MethodBinding()
英文文档:
MethodBinding
public MethodBinding()
- Deprecated.
Method Detail |
---|
abstract public Object
invoke(FacesContext context, Object[] params) throws EvaluationException, MethodNotFoundException
相对于指定的 FacesContext
,返回调用此方法绑定表达式所标识的方法,并传入指定参数所得的返回值(如果有)。
context |
当前请求的 FacesContext |
params |
要传递给所调用方法的参数数组;如果没有参数,则为 null |
Throws | EvaluationException:
如果调用的方法抛出异常(抛出的异常必须作为此异常的 cause 属性包含在内) |
Throws | MethodNotFoundException: 如果没有找到合适的方法 |
Throws | NullPointerException:
如果 context 为 null |
invoke
public abstract Object invoke(FacesContext context, Object[] params) throws EvaluationException, MethodNotFoundException
- Deprecated.
Return the return value (if any) resulting from a call to the method identified by this method binding expression, passing it the specified parameters, relative to the specified
FacesContext
.- Parameters:
context
-FacesContext
for the current requestparams
- Array of parameters to be passed to the called method, ornull
for no parameters- Throws:
EvaluationException
- if an exception is thrown by the called method (the thrown exception must be included as thecause
property of this exception)MethodNotFoundException
- if no suitable method can be foundNullPointerException
- ifcontext
isnull
abstract public Class<T>
getType(FacesContext context) throws MethodNotFoundException
返回表示此方法绑定表达式所标识方法的返回类型的 Java 类。
context |
当前请求的 FacesContext |
Throws | MethodNotFoundException: 如果没有找到合适的方法 |
Throws | NullPointerException:
如果 context 为 null |
getType
public abstract Class getType(FacesContext context) throws MethodNotFoundException
- Deprecated.
Return the Java class representing the return type from the method identified by this method binding expression.
- Parameters:
context
-FacesContext
for the current request- Throws:
MethodNotFoundException
- if no suitable method can be foundNullPointerException
- ifcontext
isnull
public String
getExpressionString()
返回据以构建此 MethodBinding
的表达式 String(可能为 null
),带有前导分界符和尾部分界符。默认实现返回 null
。
getExpressionString
public String getExpressionString()
- Deprecated.
Return the (possibly
null
) expression String, with leading and trailing delimiters, from which thisMethodBinding
was built. The default implementation returnsnull
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!