Class UnusedCatchParameterShouldBeUnnamedCheck.CatchParameterDetails
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.coding.UnusedCatchParameterShouldBeUnnamedCheck.CatchParameterDetails
- Enclosing class:
 - UnusedCatchParameterShouldBeUnnamedCheck
 
private static final class UnusedCatchParameterShouldBeUnnamedCheck.CatchParameterDetails
extends Object
Maintains information about the catch parameter.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe name of the catch parameter.private final DetailASTAst of typeTokenTypes.PARAMETER_DEFto use it when logging.private booleanIs the variable used. - 
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCatchParameterDetails(DetailAST enclosingCatchClause) Create a new catch parameter instance. - 
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetName()Get the name of the catch parameter.private DetailASTGet the parameter definition token of the catch parameter represented by ast of typeTokenTypes.PARAMETER_DEF.private booleanisUsed()Check if the catch parameter is used.private voidRegister the catch parameter as used. 
- 
Field Details
- 
name
The name of the catch parameter. - 
parameterDefinition
Ast of typeTokenTypes.PARAMETER_DEFto use it when logging. - 
used
Is the variable used. 
 - 
 - 
Constructor Details
- 
CatchParameterDetails
Create a new catch parameter instance.- Parameters:
 enclosingCatchClause- ast of typeTokenTypes.LITERAL_CATCH
 
 - 
 - 
Method Details
- 
registerAsUsed
Register the catch parameter as used. - 
getName
Get the name of the catch parameter.- Returns:
 - the name of the catch parameter
 
 - 
isUsed
Check if the catch parameter is used.- Returns:
 - true if the catch parameter is used
 
 - 
getParameterDefinition
Get the parameter definition token of the catch parameter represented by ast of typeTokenTypes.PARAMETER_DEF.- Returns:
 - the ast of type 
TokenTypes.PARAMETER_DEF 
 
 -