Interface RootModule
- All Superinterfaces:
Configurable
- All Known Implementing Classes:
Checker
The first module that is run as part of Checkstyle and controls its entire
behavior and children.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(AuditListener listener) Add the listener that will be used to receive events from the audit.void
destroy()
Cleans up the object.int
Processes a set of files.void
setModuleClassLoader
(ClassLoader moduleClassLoader) Sets the classloader used to load Checkstyle core and custom module classes when the module tree is being built up.Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Configurable
configure
-
Method Details
-
destroy
void destroy()Cleans up the object. -
process
Processes a set of files. Once this is done, it is highly recommended to call for the destroy method to close and remove the listeners.- Parameters:
files
- the list of files to be audited.- Returns:
- the total number of audit events with error severity found
- Throws:
CheckstyleException
- if error condition within Checkstyle occurs- See Also:
-
addListener
Add the listener that will be used to receive events from the audit.- Parameters:
listener
- the nosy thing
-
setModuleClassLoader
Sets the classloader used to load Checkstyle core and custom module classes when the module tree is being built up. If no custom ModuleFactory is being set for the root module then this module classloader must be specified.- Parameters:
moduleClassLoader
- the classloader used to load module classes
-