if (m != null) return new VelMethodImpl(m, false, getNeededConverters(m.getParameterTypes(), args)); return new VelMethodImpl(m, true, getNeededConverters(m.getParameterTypes(), args)); if (m != null) return new VelMethodImpl(m, false, getNeededConverters(m.getParameterTypes(), args));
/** * @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); }
if (m != null) return new VelMethodImpl(m); return new VelMethodImpl(m, true); if (m != null) return new VelMethodImpl(m);
if (m != null) return new VelMethodImpl(m); return new VelMethodImpl(m, true); if (m != null) return new VelMethodImpl(m);
if (isVarArg()) actual = handleVarArg(type, index, actual); 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); }
/** * Method */ public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i) throws Exception { if (obj == null) return null; Method m = introspector.getMethod(obj.getClass(), methodName, args); return (m != null) ? new VelMethodImpl(m) : null; }