public static Object invoke ( Object source , String methodName , Class < ? > [ ] parameterTypes , Object [ ] parameterValues ) throws MethodException { Class < ? extends Object > clazz = source . getClass ( ) ; Method method ; if ( ArrayUtils . isEmpty ( parameterTypes ) ) { method = findMethod ( clazz , methodName , EMPTY_PARAMETER_CLASSTYPES ) ; return invoke ( source , method , EMPTY_PARAMETER_VALUES ) ; } method = findMethod ( clazz , methodName , parameterTypes ) ; return invoke ( source , method , parameterValues ) ; }
Invokes method which name equals given method name and parameter types equals given parameter types on the given source with the given parameters .