com.puppycrawl.tools.checkstyle
Class TreeWalker
- Configurable, Contextualizable, FileSetCheck
public final class TreeWalker
Responsible for walking an abstract syntax tree and notifying interested
checks at each each node.
destroy , filter , fireErrors , getCharset , getMessageCollector , getMessageDispatcher , log , log , setCharset , setFileExtensions , setMessageDispatcher |
getId , getMessageBundle , getSeverity , getSeverityLevel , log , log , log , log , log , log , log , log , log , log , log , setId , setSeverity |
TreeWalker
public TreeWalker()
Creates a new TreeWalker
instance.
parse
public static DetailAST parse(FileContents aContents)
throws RecognitionException,
TokenStreamException
Static helper method to parses a Java source file.
aContents
- contains the contents of the file
setCacheFile
public void setCacheFile(String aFileName)
aFileName
- the cache file
setClassLoader
public void setClassLoader(ClassLoader aClassLoader)
aClassLoader
- class loader to resolve classes with.
setModuleFactory
public void setModuleFactory(ModuleFactory aModuleFactory)
Sets the module factory for creating child modules (Checks).
aModuleFactory
- the factory
setTabWidth
public void setTabWidth(int aTabWidth)
aTabWidth
- the distance between tab stops