MethodExpression
.public abstract class MethodBinding
extends java.lang.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 and Description |
---|
MethodBinding()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExpressionString()
Deprecated.
Return the (possibly
null ) expression String,
with leading and trailing delimiters, from which this
MethodBinding was built. |
abstract java.lang.Class |
getType(FacesContext context)
Deprecated.
Return the Java class representing the return type from the
method identified by this method binding expression.
|
abstract java.lang.Object |
invoke(FacesContext context,
java.lang.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 . |
public abstract java.lang.Object invoke(FacesContext context, java.lang.Object[] params) throws EvaluationException, MethodNotFoundException
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
.
context
- FacesContext
for the current requestparams
- Array of parameters to be passed to the called method,
or null
for no parametersEvaluationException
- if an exception is thrown
by the called method (the thrown exception must be included as the
cause
property of this exception)MethodNotFoundException
- if no suitable method can be foundjava.lang.NullPointerException
- if context
is null
public abstract java.lang.Class getType(FacesContext context) throws MethodNotFoundException
Return the Java class representing the return type from the method identified by this method binding expression.
context
- FacesContext
for the current requestMethodNotFoundException
- if no suitable method can be foundjava.lang.NullPointerException
- if context
is null
public java.lang.String getExpressionString()
Return the (possibly null
) expression String,
with leading and trailing delimiters, from which this
MethodBinding
was built. The default implementation
returns null
.