private static void collectSwitchesOn(@NotNull Statement statement,
                                        @NotNull List<SwitchRecognizer> recognizers,
                                        @NotNull List<SwitchOnCandidate> candidates,
                                        @NotNull Set<SwitchStatement> usedSwitchStatement) {
    if (statement instanceof SwitchStatement switchStatement && !usedSwitchStatement.contains(switchStatement)) {
      SwitchExprent switchExprent = (SwitchExprent)switchStatement.getHeadExprent();
      Exprent switchSelector = Objects.requireNonNull(switchExprent).getValue();
      if (switchSelector instanceof InvocationExprent) {
        for (SwitchRecognizer recognizer : recognizers) {
          SwitchOnCandidate switchCandidate = recognizer.recognize(switchStatement, (InvocationExprent)switchSelector);
          if (switchCandidate == null) continue;
          candidates.add(0, switchCandidate);
          usedSwitchStatement.addAll(switchCandidate.usedSwitch());
          break;
        }
      }
    }
    for (Statement child : statement.getStats()) {
      collectSwitchesOn(child, recognizers, candidates, usedSwitchStatement);
    }
  }
private static void collectSwitchesOn(@NotNull Statement statement,
                                        @NotNull List<SwitchRecognizer> recognizers,
                                        @NotNull List<SwitchOnCandidate> candidates,
                                        @NotNull Set<SwitchStatement> usedSwitchStatement)