docs: private static Object toPrimitive(final String value, final Class<?> type) {
  
          final Class<?> objectType = objectTypeFor(type);
          final Object objectValue = valueOf(value, objectType);
          final Object primitiveValue;
  
          final String toValueMethodName = type.getSimpleName() + "Value";
          try {
              final Method toValueMethod = objectType.getMethod(toValueMethodName);
              primitiveValue = toValueMethod.invoke(objectValue);
          } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
              //this should never happen
              throw new RuntimeException("Can not convert to primitive type", e); //NOSONAR
          }
  
          return primitiveValue;
      }