/** * @see VelMethod#invoke(java.lang.Object, java.lang.Object[]) */ public Object invoke(Object o, Object[] actual) throws Exception { // if we're pretending an array is a list... if (wrapArray) { o = new ArrayListWrapper(o); } if (isVarArg()) { Class[] formal = method.getParameterTypes(); int index = formal.length - 1; if (actual.length >= index) { Class type = formal[index].getComponentType(); actual = handleVarArg(type, index, actual); } } // call extension point invocation return doInvoke(o, actual); }
/** * @see VelMethod#invoke(java.lang.Object, java.lang.Object[]) */ public Object invoke(Object o, Object[] actual) throws Exception { // if we're pretending an array is a list... if (wrapArray) { o = new ArrayListWrapper(o); } if (isVarArg()) { Class[] formal = method.getParameterTypes(); int index = formal.length - 1; if (actual.length >= index) { Class type = formal[index].getComponentType(); actual = handleVarArg(type, index, actual); } } // call extension point invocation return doInvoke(o, actual); }