code: @SuppressWarnings({"unchecked", "rawtypes"})
      protected Object constructFromString( final String stringValue, final String argumentName) {
          final Class clazz = getUnderlyingFieldClass();
          try {
              if (clazz.isEnum()) {
                  try {
                      return Enum.valueOf(clazz, stringValue);
                  } catch (final IllegalArgumentException e) {
                      throw new CommandLineException.BadArgumentValue(
                              argumentName,
                              stringValue,
                              String.format("'%s' is not a valid value for %s. Allowed values are %s",
                                      stringValue,
                                      clazz.getSimpleName(),
                                      getEnumOptions(clazz)));
                  }
              }
              // Need to use getDeclaredConstructor() instead of getConstructor() in case the constructor
              // is non-public. Set it to be accessible if it isn't already.
              final Constructor<?> ctor = clazz.getDeclaredConstructor(String.class);
              ctor.setAccessible(true);
              return ctor.newInstance(stringValue);
          } catch (final NoSuchMethodException e) {
              // Shouldn't happen because we've checked for presence of ctor
              throw new CommandLineException.ShouldNeverReachHereException(
                      String.format("Cannot find string ctor for %s", clazz.getName()), e);
          } catch (final InstantiationException e) {
              throw new CommandLineException.CommandLineParserInternalException(
                      String.format("Abstract class '%s' cannot be used for an argument value type.", clazz.getSimpleName()), e);
          } catch (final IllegalAccessException e) {
              throw new CommandLineException.CommandLineParserInternalException(
                      String.format("String constructor for argument value type '%s' must be public.", clazz.getSimpleName()), e);
          } catch (final InvocationTargetException e) {
              throw new CommandLineException.BadArgumentValue(
                      argumentName,
                      stringValue,
                      String.format("Failure constructing '%s' from the string '%s'.", clazz.getSimpleName(), stringValue));
          }
      }
docs: Attempt to construct a value for this field from a {@code String} value.
  
  @param stringValue the value to be used to initialize the value.
  @param argumentName the name of this argument
  @return the constructed object