com.puppycrawl.tools.checkstyle.checks.usage

Class UnusedLocalVariableCheck

Implemented Interfaces:
Configurable, Contextualizable

public class UnusedLocalVariableCheck
extends AbstractUsageCheck

Checks that a local variable is read.

An example of how to configure the check is:

 <module name="usage.UnusedLocalVariable"/>
 

Author:
Rick Giles

Method Summary

int[]
getDefaultTokens()
String
getErrorKey()
boolean
mustCheckReferenceCount(DetailAST aAST)

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.usage.AbstractUsageCheck

applyTo, beginTree, finishTree, getASTManager, getErrorKey, getIgnoreFormat, getRegexp, logError, mustCheckReferenceCount, setIgnoreFormat, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

getDefaultTokens

public int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check

See Also:
Check


getErrorKey

public String getErrorKey()
Overrides:
getErrorKey in interface AbstractUsageCheck

See Also:
AbstractUsageCheck


mustCheckReferenceCount

public boolean mustCheckReferenceCount(DetailAST aAST)
Overrides:
mustCheckReferenceCount in interface AbstractUsageCheck

See Also:
AbstractUsageCheck