public Object invoke(ELContext context, Object[] params) {

        if (context == null) {
            throw new NullPointerException();
        }
        if (isLiteralText()) {
            return expression;
        }

        FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class);
        ELResolver resolver = fcontext.getApplication().getELResolver();
        Object base = null;
        for (int i = 0; i < elements.length - 1; i++) {
            base = resolver.getValue(context, base, elements[i]);
        }

        try {
            Method method = base.getClass().getMethod(elements[elements.length - 1], signature);
            Object result = method.invoke(base, params);
            return fcontext.getApplication().getExpressionFactory().coerceToType(result, expectedType);
        } catch (RuntimeException e) {
            throw e;
        } catch (Exception e) {
            throw new ELException(e);
        }

    }