Class FinalLocalVariableCheck.ScopeData
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.checks.coding.FinalLocalVariableCheck.ScopeData
-
- Enclosing class:
- FinalLocalVariableCheck
private static final class FinalLocalVariableCheck.ScopeData extends Object
Holder for the scope data.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
containsBreak
Whether there is abreak
in the scope.private Deque<DetailAST>
prevScopeUninitializedVariables
Contains definitions of previous scope uninitialized variables.private Map<String,FinalLocalVariableCheck.FinalVariableCandidate>
scope
Contains variable definitions.private Deque<DetailAST>
uninitializedVariables
Contains definitions of uninitialized variables.
-
Constructor Summary
Constructors Modifier Constructor Description private
ScopeData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<FinalLocalVariableCheck.FinalVariableCandidate>
findFinalVariableCandidateForAst(DetailAST ast)
Searches for final local variable candidate for ast in the scope.
-
-
-
Field Detail
-
scope
private final Map<String,FinalLocalVariableCheck.FinalVariableCandidate> scope
Contains variable definitions.
-
uninitializedVariables
private final Deque<DetailAST> uninitializedVariables
Contains definitions of uninitialized variables.
-
prevScopeUninitializedVariables
private Deque<DetailAST> prevScopeUninitializedVariables
Contains definitions of previous scope uninitialized variables.
-
containsBreak
private boolean containsBreak
Whether there is abreak
in the scope.
-
-
Constructor Detail
-
ScopeData
private ScopeData()
-
-
Method Detail
-
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
.
-
-