code: public static Object invoke(Object bean, String name, Object... args) throws
      NoSuchMethodException, IllegalAccessException, InvocationTargetException {
          Class<?>[] argumentTypes = new Class<?>[args.length];
          for (int i = 0; i < args.length; i++) {
              argumentTypes[i] = args[i].getClass();
          }
          return choose(bean.getClass().getMethods(), new MethodParameterExtractor(), name, argumentTypes).invoke(bean, args);
      }
docs: Invokes a bean method by choosing the best method that matches the given name and the list of arguments.
  
  @param bean the invocation target
  @param name the name of the method to invoke
  @param args the arguments to pass to the method
  @return the return value from the method
  @throws NoSuchMethodException if an appropriate method cannot be found
  @throws IllegalAccessException if an appropriate method cannot be accessed
  @throws InvocationTargetException if errors occur while invoking the method