Class AllBranchesAreIdenticalCheck
java.lang.Object
org.sonar.java.ast.visitors.SubscriptionVisitor
org.sonar.plugins.java.api.IssuableSubscriptionVisitor
org.sonar.java.checks.IdenticalCasesInSwitchCheck
org.sonar.java.checks.AllBranchesAreIdenticalCheck
- All Implemented Interfaces:
JavaCheck, JavaFileScanner
-
Nested Class Summary
Nested classes/interfaces inherited from class IdenticalCasesInSwitchCheck
IdenticalCasesInSwitchCheck.IfElseChain -
Field Summary
Fields inherited from class SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class IdenticalCasesInSwitchCheck
allBranchesSame, checkIfStatement, checkSwitchStatement, hasDefaultClause, hasElseClauseModifier and TypeMethodDescriptionprotected static booleanallBranchesSame(Map<? extends Tree, ? extends Set<? extends Tree>> identicalBranches, int size) protected static IdenticalCasesInSwitchCheck.IfElseChainprotected Map<CaseGroupTree, Set<CaseGroupTree>> protected static booleanhasDefaultClause(SwitchTree switchStatement) protected static booleanhasElseClause(IfStatementTree ifStatement) Methods inherited from class IssuableSubscriptionVisitor
addIssue, addIssueOnFile, leaveFile, reportIssue, reportIssue, reportIssue, reportIssue, scanFile, scanTree, setContextMethods inherited from class SubscriptionVisitor
leaveNode, visitToken, visitTriviaMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
AllBranchesAreIdenticalCheck
public AllBranchesAreIdenticalCheck()
-
-
Method Details
-
nodesToVisit
- Overrides:
nodesToVisitin classIdenticalCasesInSwitchCheck
-
visitNode
- Overrides:
visitNodein classIdenticalCasesInSwitchCheck
-