JarDirPathConverter implements Converter<String> { @Override public boolean supports(Class<?> type, String optionContext) { return String.class.equals(type) && optionContext.contains(ConverterHint.JARDIR); } JarDirPathConverter(); void setDelegate(FilePathStringConverter delegate); @Override boolean supports(Class<?> type, String optionContext); @Override String convertFromText(String value, Class<?> targetType, String optionContext); @Override boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType,
      String existingData, String optionContext, MethodTarget target);  }
@Test public void itSupportsString() { JarDirPathConverter jarDirPathConverter = new JarDirPathConverter(); assertThat(jarDirPathConverter.supports(String.class, ConverterHint.JARDIR)).isTrue(); assertThat(jarDirPathConverter.supports(String.class, ConverterHint.JARFILES)).isFalse(); assertThat(jarDirPathConverter.supports(Integer.class, ConverterHint.JARDIR)).isFalse(); }