code: public static <T> Parser<T> conventionalParser(Class<T> resultType)
        throws NoSuchMethodException {
      if (resultType == String.class) {
        @SuppressWarnings("unchecked") // T == String
        Parser<T> identity = (Parser<T>) IDENTITY;
        return identity;
      }
  
      final Class<T> wrappedResultType = Primitives.wrap(resultType);
  
      for (String methodName : CONVERSION_METHOD_NAMES) {
        try {
          final Method method = wrappedResultType.getDeclaredMethod(methodName, String.class);
  
          if (Util.isStatic(method) && wrappedResultType.isAssignableFrom(method.getReturnType())) {
            method.setAccessible(true); // to permit inner enums, etc.
            return new InvokingParser<T>() {
              @Override protected T invoke(String input) throws Exception {
                return wrappedResultType.cast(method.invoke(null, input));
              }
            };
          }
        } catch (Exception tryAgain) {
        }
      }
  
      final Constructor<T> constr = wrappedResultType.getDeclaredConstructor(String.class);
      constr.setAccessible(true);
      return new InvokingParser<T>() {
        @Override protected T invoke(String input) throws Exception {
          return wrappedResultType.cast(constr.newInstance(input));
        }
      };
    }
docs: Parser that tries, in this order:
  <ul>
  <li>ResultType.fromString(String)
  <li>ResultType.decode(String)
  <li>ResultType.valueOf(String)
  <li>new ResultType(String)
  </ul>