code: public Object invokeBestMethodOnTarget( String[] methodNames,
                                              final Object target,
                                              final Object... arguments )
          throws NoSuchMethodException, SecurityException, IllegalArgumentException, IllegalAccessException,
          InvocationTargetException {
          Class<?>[] argumentClasses = buildArgumentClasses(arguments);
          int remaining = methodNames.length;
          Object result = null;
          for (String methodName : methodNames) {
              --remaining;
              try {
                  final Method method = findBestMethodWithSignature(methodName, argumentClasses);
                  result = AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                      @Override
                      public Object run() throws Exception {
                          return method.invoke(target, arguments);
                      }
                  });
                  break;
              } catch (PrivilegedActionException pae) {
                  // pae will be wrapping one of IllegalAccessException, IllegalArgumentException, InvocationTargetException
                  if (pae.getException() instanceof IllegalAccessException) {
                      throw (IllegalAccessException)pae.getException();
                  }
  
                  if (pae.getException() instanceof IllegalArgumentException) {
                      throw (IllegalArgumentException)pae.getException();
                  }
  
                  if (pae.getException() instanceof InvocationTargetException) {
                      throw (InvocationTargetException)pae.getException();
                  }
  
              } catch (NoSuchMethodException e) {
                  if (remaining == 0) throw e;
              }
          }
          return result;
      }
docs: Find and execute the best method on the target class that matches the signature specified with one of the specified names
  and the list of arguments. If no such method is found, a NoSuchMethodException is thrown.
  <P>
  This method is unable to find methods with signatures that include both primitive arguments <i>and</i> arguments that are
  instances of <code>Number</code> or its subclasses.
  </p>
  
  @param methodNames the names of the methods that are to be invoked, in the order they are to be tried
  @param target the object on which the method is to be invoked
  @param arguments the array of Object instances that correspond to the arguments passed to the method.
  @return the Method object that references the method that satisfies the requirements, or null if no satisfactory method
  could be found.
  @throws NoSuchMethodException if a matching method is not found.
  @throws SecurityException if access to the information is denied.
  @throws InvocationTargetException
  @throws IllegalAccessException
  @throws IllegalArgumentException