class KiltReformatter {

  public void reformat(final FileMatcher fileMatcher, final String formatString, final boolean reformatKeyAndValue, final Charset charset) {
    Require.nonNull(fileMatcher);
    Require.nonNull(formatString);
    Require.nonNull(charset);

    final Set<File> propertyFiles= fileMatcher.findMatchingFiles();
    LOGGER.log(Level.INFO, "Reformatting entries in the following files: {}", propertyFiles);

    final Reformatter reformatter= new Reformatter(
      ReformatOptions.create()
        .with(charset)
        .withFormat(formatString)
        .withReformatKeyAndValue(reformatKeyAndValue));

    for (final File propertyFile : propertyFiles) {
      reformatter.reformat(propertyFile);
    }
  }

}