Class FinalLocalVariableCheck.ScopeData
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.ScopeData
- Enclosing class:
- FinalLocalVariableCheck
Holder for the scope data.
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
Whether there is abreak
in the scope.Contains definitions of previous scope uninitialized variables.private final Map<String,
FinalLocalVariableCheck.FinalVariableCandidate> Contains variable definitions.Contains definitions of uninitialized variables. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSearches for final local variable candidate for ast in the scope.
-
Field Details
-
scope
Contains variable definitions. -
uninitializedVariables
Contains definitions of uninitialized variables. -
prevScopeUninitializedVariables
Contains definitions of previous scope uninitialized variables. -
containsBreak
Whether there is abreak
in the scope.
-
-
Constructor Details
-
ScopeData
private ScopeData()
-
-
Method Details
-
findFinalVariableCandidateForAst
public Optional<FinalLocalVariableCheck.FinalVariableCandidate> findFinalVariableCandidateForAst(DetailAST ast) Searches for final local variable candidate for ast in the scope.- Parameters:
ast
- ast.- Returns:
- Optional of
FinalLocalVariableCheck.FinalVariableCandidate
.
-