Interface RootModule

  • All Superinterfaces:
    Configurable
    All Known Implementing Classes:
    Checker

    public interface RootModule
    extends Configurable
    The first module that is run as part of Checkstyle and controls its entire behavior and children.
    • Method Detail

      • destroy

        void destroy()
        Cleans up the object.
      • process

        int process​(List<File> files)
             throws CheckstyleException
        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:
        destroy()
      • addListener

        void addListener​(AuditListener listener)
        Add the listener that will be used to receive events from the audit.
        Parameters:
        listener - the nosy thing
      • setModuleClassLoader

        void setModuleClassLoader​(ClassLoader moduleClassLoader)
        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