@Test public void testIgnoresLocaleOfParserForCaseInsensitivity() throws ArgumentParserException { ArgumentParser ap = ArgumentParsers.newFor("argparse4j") .locale(new Locale("tr")).build(); CaseInsensitiveEnumStringArgumentType<Lang> type = CaseInsensitiveEnumStringArgumentType .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,C++,Interlisp})", e.getMessage()); } }
public static <T extends Enum<T>> CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumStringArgumentType<T>(type); }
CaseInsensitiveEnumStringArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumStringArgumentType<T>(type); } }
CaseInsensitiveEnumStringArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumStringArgumentType<T>(type); } CaseInsensitiveEnumStringArgumentType(Class<T> type); }
CaseInsensitiveEnumStringArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumStringArgumentType<T>(type); } CaseInsensitiveEnumStringArgumentType(Class<T> type); static CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type); }
CaseInsensitiveEnumStringArgumentType extends CaseInsensitiveEnumArgumentType<T> { public static <T extends Enum<T>> CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type) { return new CaseInsensitiveEnumStringArgumentType<T>(type); } CaseInsensitiveEnumStringArgumentType(Class<T> type); static CaseInsensitiveEnumStringArgumentType<T> forEnum(Class<T> type);  }