@Test public void testIgnoresLocaleOfParserForCaseInsensitivity() { ArgumentParser ap = ArgumentParsers.newFor("argparse4j") .locale(new Locale("tr")).build(); CaseInsensitiveEnumNameArgumentType<Lang> type = CaseInsensitiveEnumNameArgumentType .forEnum(Lang.class); try { type.convert(ap, new MockArgument(), "ıNTERLISP"); fail("Expected ArgumentParserException to be thrown"); } catch (ArgumentParserException e) { assertEquals( "argument null: could not convert 'ıNTERLISP' (choose from {PYTHON,JAVA,CPP,INTERLISP})", e.getMessage()); } }
public static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumNameArgumentType<T>(type); }
CaseInsensitiveEnumNameArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumNameArgumentType<T>(type); } }
CaseInsensitiveEnumNameArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumNameArgumentType<T>(type); } CaseInsensitiveEnumNameArgumentType(Class<T> type); }
CaseInsensitiveEnumNameArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumNameArgumentType<T>(type); } CaseInsensitiveEnumNameArgumentType(Class<T> type); static CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type); }
CaseInsensitiveEnumNameArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumNameArgumentType<T>(type); } CaseInsensitiveEnumNameArgumentType(Class<T> type); static CaseInsensitiveEnumNameArgumentType<T> forEnum(Class<T> type);  }