APISonar


com.google.googlejavaformat.java.JavaFormatterOptions.Style.GOOGLE

> com > google > googlejavaformat > java > JavaFormatterOptions > Style > GOOGLE
com APIs google APIs googlejavaformat APIs java APIs JavaFormatterOptions APIs Style APIs GOOGLE APIs

Example 1
private ImportOrderer(String text, ImmutableList<Tok> toks, Style style) {
    this.text = text;
    this.toks = toks;
    this.lineSeparator = Newlines.guessLineSeparator(text);
    if (style.equals(Style.GOOGLE)) {
      this.importComparator = GOOGLE_IMPORT_COMPARATOR;
      this.shouldInsertBlankLineFn = ImportOrderer::shouldInsertBlankLineGoogle;
    } else if (style.equals(Style.AOSP)) {
      this.importComparator = AOSP_IMPORT_COMPARATOR;
      this.shouldInsertBlankLineFn = ImportOrderer::shouldInsertBlankLineAosp;
    } else {
      throw new IllegalArgumentException("Unsupported code style: " + style);
    }
  }