Example usage for javax.el MethodNotFoundException MethodNotFoundException

List of usage examples for javax.el MethodNotFoundException MethodNotFoundException

Introduction

In this page you can find the example usage for javax.el MethodNotFoundException MethodNotFoundException.

Prototype

public MethodNotFoundException(Throwable cause) 

Source Link

Usage

From source file:org.ajax4jsf.renderkit.ComponentUtils.java

/**
 * Invoke a named method whose parameter type matches the object type.
 * @param objects - invoke method on this object
 * @param methodName - get method with this name
 * @param arrayParameters - use these arguments - treat null as empty array
 * @return//  w w  w . j ava 2 s  .  c o m
 */
private static Object invokeMethod(Object object, String methodName, Object[][] arrayParameters) {

    try {
        for (int iParameter = 0; iParameter < arrayParameters.length; iParameter++) {
            try {
                return MethodUtils.invokeMethod(object, methodName, arrayParameters[iParameter]);
            } catch (NoSuchMethodException e) {
                continue;
            }
        }
    } catch (InvocationTargetException e) {
        throw new FacesException(
                Messages.getMessage(Messages.METHOD_CALL_ERROR_2b, methodName, e.getCause().getMessage()), e);
    } catch (IllegalAccessException e) {
        throw new FacesException(Messages.getMessage(Messages.METHOD_CALL_ERROR_4b, methodName, e.getMessage()),
                e);
    }
    throw new MethodNotFoundException(Messages.getMessage(Messages.METHOD_CALL_ERROR_6b, methodName, object));
}