public Object convert(ArgumentParserImpl parser, String value)
throws ArgumentParserException {
Object obj = type_.convert(parser, this, value);
if (choice_ != null && !choice_.contains(obj)) {
throw new ArgumentParserException(String.format(
TextHelper.LOCALE_ROOT,
"invalid choice: '%s' (choose from %s)", value,
choice_.textualFormat()), parser, this);
}
return obj;