Class TreeWalker

    • Constructor Detail

      • TreeWalker

        public TreeWalker()
        Creates a new TreeWalker instance.
    • Method Detail

      • setTabWidth

        public void setTabWidth​(int tabWidth)
        Sets tab width.
        Parameters:
        tabWidth - the distance between tab stops
      • setCacheFile

        @Deprecated
        public void setCacheFile​(java.lang.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
        Sets cache file.
        Parameters:
        fileName - the cache file
      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classLoader)
        Sets classLoader to load class.
        Parameters:
        classLoader - class loader to resolve classes with.
      • setModuleFactory

        public void setModuleFactory​(ModuleFactory moduleFactory)
        Sets the module factory for creating child modules (Checks).
        Parameters:
        moduleFactory - the factory
      • finishLocalSetup

        public void finishLocalSetup()
        Description copied from class: AutomaticBean
        Provides a hook to finish the part of this component's setup that was not handled by the bean introspection.

        The default implementation does nothing.

        Overrides:
        finishLocalSetup in class AbstractViolationReporter
      • getExternalResourceLocations

        public java.util.Set<java.lang.String> getExternalResourceLocations()
        Description copied from interface: ExternalResourceHolder
        Returns a set of external configuration resource locations which are used by the module. ATTENTION! If 'getExternalResourceLocations()' return null, there will be 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.
        Specified by:
        getExternalResourceLocations in interface ExternalResourceHolder
        Returns:
        a set of external configuration resource locations which are used by the module.