JarFilesPathConverter implements Converter<String[]> { @Override public boolean supports(Class<?> type, String optionContext) { return String[].class.equals(type) && optionContext.contains(ConverterHint.JARFILES); } JarFilesPathConverter(); 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 itSupportsStringArray() { JarFilesPathConverter jarFilesPathConverter = new JarFilesPathConverter(); assertThat(jarFilesPathConverter.supports(String[].class, ConverterHint.JARFILES)).isTrue(); assertThat(jarFilesPathConverter.supports(String[].class, ConverterHint.JARDIR)).isFalse(); assertThat(jarFilesPathConverter.supports(Integer.class, ConverterHint.JARDIR)).isFalse(); }