Class SuppressionsLoader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.puppycrawl.tools.checkstyle.XmlLoader
-
- com.puppycrawl.tools.checkstyle.filters.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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.XmlLoader
XmlLoader.LoadExternalDtdFeatureProvider
-
-
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 suppressionTreeWalker
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 com.puppycrawl.tools.checkstyle.XmlLoader
error, parseInputSource, resolveEntity
-
-
-
-
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 interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.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 suppressionTreeWalker
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.
-
-