Class SuppressionsLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.puppycrawl.tools.checkstyle.XmlLoader
com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
Loads a filter chain of suppressions.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
XmlLoader.LoadExternalDtdFeatureProvider -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterSetloadSuppressions(String filename) Returns the suppression filters in a specified file.static Set<TreeWalkerFilter> loadXpathSuppressions(String filename) Returns the suppressionTreeWalkerfilters in a specified file.voidstartElement(String namespaceUri, String localName, String qName, Attributes attributes) Methods inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
error, parseInputSource, resolveEntityMethods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Method Details
-
startElement
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
loadSuppressions
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 Set<TreeWalkerFilter> loadXpathSuppressions(String filename) throws CheckstyleException Returns the suppressionTreeWalkerfilters 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.
-