com.puppycrawl.tools.checkstyle.checks
Class DeclarationCollector
java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
com.puppycrawl.tools.checkstyle.checks.DeclarationCollector
- All Implemented Interfaces:
- Configurable, Contextualizable
- Direct Known Subclasses:
- RequireThisCheck
public abstract class DeclarationCollector
- extends Check
Abstract class for checks which need to collect information about
declared members/parameters/variables.
- Author:
- o_sukhodolsky
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeclarationCollector
public DeclarationCollector()
beginTree
public void beginTree(DetailAST aRootAST)
- Description copied from class:
Check
- Called before the starting to process a tree. Ideal place to initialise
information that is to be collected whilst processing a tree.
- Overrides:
beginTree
in class Check
- Parameters:
aRootAST
- the root of the tree
visitToken
public void visitToken(DetailAST aAST)
- Description copied from class:
Check
- Called to process a token.
- Overrides:
visitToken
in class Check
- Parameters:
aAST
- the token to process
isClassField
protected final boolean isClassField(String aName)
- Check if given name is a name for class field in current environment.
- Parameters:
aName
- a name to check
- Returns:
- true is the given name is name of method or member.
Copyright © 2001-2014. All Rights Reserved.