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) |
void |
setClassLoader(ClassLoader classLoader) |
void |
setModuleFactory(ModuleFactory moduleFactory)
Sets the module factory for creating child modules (Checks).
|
void |
setTabWidth(int tabWidth) |
void |
setupChild(Configuration childConf)
Called by configure() for every child of this component's Configuration.
|
beginProcessing, finishProcessing, fireErrors, getMessageCollector, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatchergetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, getConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconfigurecontextualizepublic TreeWalker()
TreeWalker instance.public void setTabWidth(int tabWidth)
tabWidth - the distance between tab stopspublic void setCacheFile(String fileName)
fileName - the cache filepublic void setClassLoader(ClassLoader classLoader)
classLoader - class loader to resolve classes with.public void setModuleFactory(ModuleFactory moduleFactory)
moduleFactory - the factorypublic void finishLocalSetup()
AutomaticBeanThe default implementation does nothing.
finishLocalSetup in class AutomaticBeanpublic void setupChild(Configuration childConf) throws CheckstyleException
AutomaticBeanThe default implementation does nothing.
setupChild in class AutomaticBeanchildConf - a child of this component's ConfigurationCheckstyleException - if there is a configuration error.Configuration.getChildren()protected void processFiltered(File file, List<String> lines)
AbstractFileSetCheckprocessFiltered in class AbstractFileSetCheckfile - the file to be processedlines - an immutable list of the contents of the file.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()
AbstractFileSetCheckdestroy in interface FileSetCheckdestroy in class AbstractFileSetCheckCopyright © 2001–2015. All rights reserved.