Code example for Method

Methods: getName, getParameterTypes, getReturnType

0
        this.data = data;
        this.method = method;
    } 
 
    public MethodInfo getMethodInfo(ELContext context) {
        return new MethodInfo(this.method.getName(),
                              this.method.getReturnType(),
                              this.method.getParameterTypes());
    } 
 
    public Object invoke(ELContext context, Object[] params) {
        if (data.isRowAvailable()) {
            Object target = data.getRowData();
            if (target != null) {
                try { 
                    ModelBean bean = ModelBean.wrap(target);
                    return bean.invokeAction(this.method, params);
                } catch (Exception ex) {
                    throw new ELException(ex);
                } 
            }