code: private Object[] convertArguments(Object[] arguments, Type[] parameterTypes, boolean isVarArgs)
      {
          Object[] convertedArguments = Arrays.copyOf(arguments, arguments.length);
          for (int i = 0; i < arguments.length; i++) {
              // Try to convert the argument if it's not null and if it doesn't match the parameter type.
              // If the method is a varargs then extract the type from the vararg array
              Type expectedType;
              if (isVarArgs && i >= parameterTypes.length - 1) {
                  expectedType = ((Class<?>) parameterTypes[parameterTypes.length - 1]).getComponentType();
              } else {
                  expectedType = parameterTypes[i];
              }
  
              if (arguments[i] != null && !TypeUtils.isInstance(arguments[i], expectedType)) {
                  convertedArguments[i] = this.converterManager.convert(expectedType, arguments[i]);
              }
          }
  
          return convertedArguments;
      }
docs: Tries to convert the given arguments to match the specified formal parameters types.
  <p>
  Throws a runtime exception if the conversion fails.
  
  @param arguments the method actual arguments
  @param parameterTypes the method formal parameter types
  @param isVarArgs true if the method contains a varargs (ie the last parameter is a varargs)
  @return a new array of arguments where some values have been converted to match the formal method parameter types