Class SuppressionsLoader

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public final class SuppressionsLoader
    extends XmlLoader
    Loads a filter chain of suppressions.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static FilterSet loadSuppressions​(java.lang.String filename)
      Returns the suppression filters in a specified file.
      static java.util.Set<TreeWalkerFilter> loadXpathSuppressions​(java.lang.String filename)
      Returns the suppression TreeWalker filters in a specified file.
      void startElement​(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • startElement

        public void startElement​(java.lang.String namespaceUri,
                                 java.lang.String localName,
                                 java.lang.String qName,
                                 org.xml.sax.Attributes attributes)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • loadSuppressions

        public static FilterSet loadSuppressions​(java.lang.String filename)
                                          throws CheckstyleException
        Returns the suppression filters in a specified file.
        Parameters:
        filename - name of the suppressions file.
        Returns:
        the filter chain of suppression elements specified in the file.
        Throws:
        CheckstyleException - if an error occurs.
      • loadXpathSuppressions

        public static java.util.Set<TreeWalkerFilter> loadXpathSuppressions​(java.lang.String filename)
                                                                     throws CheckstyleException
        Returns the suppression TreeWalker filters in a specified file.
        Parameters:
        filename - name of the suppressions file.
        Returns:
        the set of xpath suppression elements specified in the file.
        Throws:
        CheckstyleException - if an error occurs.