class GoogleJavaFormatTool implements Tool {
  @Override
  public String name() {
    return "google-java-format";
  }

  @Override
  public Set<SourceVersion> getSourceVersions() {
    return Arrays.stream(SourceVersion.values()).collect(toImmutableEnumSet());
  }

  @Override
  public int run(InputStream in, OutputStream out, OutputStream err, String... args) {<FILL_FUNCTION_BODY>}
}

    PrintStream outStream = new PrintStream(out);
    PrintStream errStream = new PrintStream(err);
    try {
      return Main.main(in, outStream, errStream, args);
    } catch (RuntimeException e) {
      errStream.print(e.getMessage());
      errStream.flush();
      return 1; // pass non-zero value back indicating an error has happened
    }
  
<no_super_class>