public final class TreeWalker extends AbstractFileSetCheck
Constructor and Description |
---|
TreeWalker()
Creates a new
TreeWalker instance. |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Cleans up the object.
|
void |
finishLocalSetup()
Provides a hook to finish the part of this compoent's setup that
was not handled by the bean introspection.
|
static DetailAST |
parse(FileContents aContents)
Static helper method to parses a Java source file.
|
void |
process(File[] aFiles)
Processes a set of files and fires errors to the MessageDispatcher.
|
void |
setCacheFile(String aFileName) |
void |
setClassLoader(ClassLoader aClassLoader) |
void |
setModuleFactory(ModuleFactory aModuleFactory)
Sets the module factory for creating child modules (Checks).
|
void |
setTabWidth(int aTabWidth) |
void |
setupChild(Configuration aChildConf)
Instantiates, configures and registers a Check that is specified
in the provided configuration.
|
filter, fireErrors, getCharset, getMessageCollector, getMessageDispatcher, log, log, setCharset, setFileExtensions, setMessageDispatcher
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setId, setSeverity
configure, contextualize, getConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
contextualize
public void setTabWidth(int aTabWidth)
aTabWidth
- the distance between tab stopspublic void setCacheFile(String aFileName)
aFileName
- the cache filepublic void setClassLoader(ClassLoader aClassLoader)
aClassLoader
- class loader to resolve classes with.public void setModuleFactory(ModuleFactory aModuleFactory)
aModuleFactory
- the factorypublic void finishLocalSetup()
AutomaticBean
The default implementation does nothing.
finishLocalSetup
in class AutomaticBean
Configurable
public void setupChild(Configuration aChildConf) throws CheckstyleException
The default implementation does nothing.
setupChild
in class AutomaticBean
aChildConf
- a child of this component's ConfigurationCheckstyleException
- if there is a configuration error.Configuration.getChildren()
public static DetailAST parse(FileContents aContents) throws RecognitionException, TokenStreamException
aContents
- contains the contents of the fileTokenStreamException
- if lexing failedRecognitionException
- if parsing failedpublic void process(File[] aFiles)
aFiles
- the files to be audited.FileSetCheck.destroy()
public void destroy()
FileSetCheck
destroy
in interface FileSetCheck
destroy
in class AbstractFileSetCheck
FileSetCheck