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 component's setup that
was not handled by the bean introspection.
|
static DetailAST |
parse(FileContents contents)
Static helper method to parses a Java source file.
|
protected void |
processFiltered(File file,
List<String> lines)
Called to process a file that matches the specified file extensions.
|
void |
setCacheFile(String fileName)
Sets cache file.
|
void |
setClassLoader(ClassLoader classLoader) |
void |
setModuleFactory(ModuleFactory moduleFactory)
Sets the module factory for creating child modules (Checks).
|
void |
setTabWidth(int tabWidth)
Sets tab width.
|
void |
setupChild(Configuration childConf)
Called by configure() for every child of this component's Configuration.
|
beginProcessing, finishProcessing, fireErrors, getFileExtensions, getMessageCollector, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatcher
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, getConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
contextualize
public void setTabWidth(int tabWidth)
tabWidth
- the distance between tab stopspublic void setCacheFile(String fileName) throws IOException
fileName
- the cache fileIOException
- if there are some problems with file loadingpublic void setClassLoader(ClassLoader classLoader)
classLoader
- class loader to resolve classes with.public void setModuleFactory(ModuleFactory moduleFactory)
moduleFactory
- the factorypublic void finishLocalSetup()
AutomaticBean
The default implementation does nothing.
finishLocalSetup
in class AutomaticBean
public void setupChild(Configuration childConf) throws CheckstyleException
AutomaticBean
The default implementation does nothing.
setupChild
in class AutomaticBean
childConf
- a child of this component's ConfigurationCheckstyleException
- if there is a configuration error.Configuration.getChildren()
protected void processFiltered(File file, List<String> lines) throws CheckstyleException
AbstractFileSetCheck
processFiltered
in class AbstractFileSetCheck
file
- the file to be processedlines
- an immutable list of the contents of the file.CheckstyleException
- if error condition within Checkstyle occurs.public static DetailAST parse(FileContents contents) throws antlr.RecognitionException, antlr.TokenStreamException
contents
- contains the contents of the fileantlr.TokenStreamException
- if lexing failedantlr.RecognitionException
- if parsing failedpublic void destroy()
FileSetCheck
destroy
in interface FileSetCheck
destroy
in class AbstractFileSetCheck
Copyright © 2001–2016. All rights reserved.