Class UnusedLambdaParameterShouldBeUnnamedCheck.LambdaParameterDetails
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.coding.UnusedLambdaParameterShouldBeUnnamedCheck.LambdaParameterDetails
- Enclosing class:
- UnusedLambdaParameterShouldBeUnnamedCheck
private static final class UnusedLambdaParameterShouldBeUnnamedCheck.LambdaParameterDetails
extends Object
Maintains information about the lambda parameter.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DetailAST
Ast of typeTokenTypes.LAMBDA
enclosing the lambda parameter.private final DetailAST
Ast of typeTokenTypes.IDENT
of the given lambda parameter.private boolean
Is the variable used. -
Constructor Summary
ModifierConstructorDescriptionprivate
LambdaParameterDetails
(DetailAST enclosingLambda, DetailAST identifierAst) Create a new lambda parameter instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate DetailAST
Get ast of typeTokenTypes.IDENT
of the given lambda parameter.private String
getName()
Get the name of the lambda parameter.private boolean
isUsed()
Check if the lambda parameter is used.private void
Register the lambda parameter as used.
-
Field Details
-
enclosingLambda
Ast of typeTokenTypes.LAMBDA
enclosing the lambda parameter. -
identifierAst
Ast of typeTokenTypes.IDENT
of the given lambda parameter. -
used
Is the variable used.
-
-
Constructor Details
-
LambdaParameterDetails
Create a new lambda parameter instance.- Parameters:
enclosingLambda
- ast of typeTokenTypes.LAMBDA
identifierAst
- ast of typeTokenTypes.IDENT
-
-
Method Details
-
registerAsUsed
Register the lambda parameter as used. -
getName
Get the name of the lambda parameter.- Returns:
- the name of the lambda parameter
-
getIdentifierAst
Get ast of typeTokenTypes.IDENT
of the given lambda parameter.- Returns:
- ast of type
TokenTypes.IDENT
of the given lambda parameter
-
isUsed
Check if the lambda parameter is used.- Returns:
- true if the lambda parameter is used
-