Top Description Constructors Methods
javax.faces.el

public abstract Class MethodBinding

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.faces.application.MethodBindingMethodExpressionAdapter, com.sun.faces.facelets.el.LegacyMethodBinding
Imports
javax.faces.context.FacesContext

Deprecated

This has been replaced by javax.el.MethodExpression.

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 javax.faces.application.Application instance for this web application.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the expression string
getExpressionString
()

Return the (possibly null) expression String, with leading and trailing delimiters, from which this MethodBinding was built.

public abstract Class<T>

Returns:

the type of the return value
getType
(FacesContext
FacesContext for the current request
context
)

Return the Java class representing the return type from the method identified by this method binding expression.

public abstract Object

Returns:

the result of the invocation
invoke
(FacesContext
FacesContext for the current request
context
,
Object[]
Array of parameters to be passed to the called method, or null for no parameters
params
)

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.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MethodBindingback to summary
public MethodBinding()

Method Detail

getExpressionStringback to summary
public String getExpressionString()

Return the (possibly null) expression String, with leading and trailing delimiters, from which this MethodBinding was built. The default implementation returns null.

Returns:String

the expression string

getTypeback to summary
public abstract Class<T> getType(FacesContext context) throws MethodNotFoundException

Return the Java class representing the return type from the method identified by this method binding expression.

Parameters
context:FacesContext

FacesContext for the current request

Returns:Class<T>

the type of the return value

Exceptions
MethodNotFoundException:
if no suitable method can be found
NullPointerException:
if context is null
invokeback to summary
public abstract Object invoke(FacesContext context, 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.

Parameters
context:FacesContext

FacesContext for the current request

params:Object[]

Array of parameters to be passed to the called method, or null for no parameters

Returns:Object

the result of the invocation

Exceptions
EvaluationException:
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 found
NullPointerException:
if context is null