public final class TreeWalker extends AbstractFileSetCheck implements ExternalResourceHolder
AutomaticBean.OutputStreamOptions
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.
|
Set<String> |
getExternalResourceLocations()
Returns a set of external configuration resource locations which are used by the module.
|
protected void |
processFiltered(File file,
FileText fileText)
Called to process a file that matches the specified file extensions.
|
void |
setCacheFile(String fileName)
Deprecated.
Use
Checker.setCacheFile(java.lang.String) instead. It does not do anything now. We just
keep the setter for transition period to the same option in Checker. The
method will be completely removed in Checkstyle 8.0. See
issue#2883 |
void |
setClassLoader(ClassLoader classLoader)
Sets classLoader to load class.
|
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.
|
addMessages, beginProcessing, finishProcessing, fireErrors, getFileExtensions, getMessageDispatcher, init, log, log, process, setFileExtensions, setMessageDispatcher
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
configure
contextualize
public TreeWalker()
TreeWalker
instance.public void setTabWidth(int tabWidth)
tabWidth
- the distance between tab stops@Deprecated public void setCacheFile(String fileName)
Checker.setCacheFile(java.lang.String)
instead. It does not do anything now. We just
keep the setter for transition period to the same option in Checker. The
method will be completely removed in Checkstyle 8.0. See
issue#2883fileName
- the cache filepublic 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 AbstractViolationReporter
public void setupChild(Configuration childConf) throws CheckstyleException
The default implementation throws CheckstyleException
if
childConf
is null
because it doesn't support children. It
must be overridden to validate and support children that are wanted.
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, FileText fileText) throws CheckstyleException
AbstractFileSetCheck
processFiltered
in class AbstractFileSetCheck
file
- the file to be processedfileText
- the contents of the file.CheckstyleException
- if error condition within Checkstyle occurs.public void destroy()
FileSetCheck
destroy
in interface FileSetCheck
destroy
in class AbstractFileSetCheck
public Set<String> getExternalResourceLocations()
ExternalResourceHolder
NullPointerException
in Checker
.
Such behaviour will signal that your module (check or filter) is designed incorrectly.
It make sense to return an empty set from 'getExternalResourceLocations()'
only for composite modules like TreeWalker
.getExternalResourceLocations
in interface ExternalResourceHolder
Copyright © 2001–2018. All rights reserved.