code: private static Object createAndPopulateVarArgsArray(Class<?> varArgsType, int varArgsStartPosition,
                                                          Object... arguments) {
          Object arrayInstance = Array.newInstance(varArgsType, arguments.length - varArgsStartPosition);
          for (int i = varArgsStartPosition; i < arguments.length; i++) {
              Array.set(arrayInstance, i - varArgsStartPosition, arguments[i]);
          }
          return arrayInstance;
      }
docs: Creates the and populate var args array.
  
  @param varArgsType          the var args type
  @param varArgsStartPosition the var args start position
  @param arguments            the arguments
  @return the object