Class AbstractHeaderCheck

    • Constructor Detail

      • AbstractHeaderCheck

        public AbstractHeaderCheck()
    • Method Detail

      • postProcessHeaderLines

        protected abstract void postProcessHeaderLines()
        Hook method for post processing header lines. This implementation does nothing.
      • getHeaderLines

        protected List<String> getHeaderLines()
        Return the header lines to check against.
        Returns:
        the header lines to check against.
      • setHeaderFile

        public void setHeaderFile​(URI uri)
                           throws CheckstyleException
        Set the header file to check against.
        Parameters:
        uri - the uri of the header to load.
        Throws:
        CheckstyleException - if fileName is empty.
      • setHeader

        public void setHeader​(String header)
        Set the header to check against. Individual lines in the header must be separated by '\n' characters.
        Parameters:
        header - header content to check against.
        Throws:
        IllegalArgumentException - if the header cannot be interpreted
      • getExternalResourceLocations

        public Set<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.