List<SwitchReplacer> (@NotNull PsiSwitchStatement switchStatement, int maxNumberStatementsForExpression) { PsiExpression expression = switchStatement.getExpression(); if (expression == null) return List.of(); PsiCodeBlock body = switchStatement.getBody(); if (body == null) return List.of(); List<OldSwitchStatementBranch> branches = extractBranches(body, switchStatement); if (branches == null || branches.isEmpty()) return List.of(); boolean isExhaustive = isExhaustiveSwitch(branches, switchStatement); return runInspections(switchStatement, isExhaustive, branches, maxNumberStatementsForExpression); }