Class SuppressionsLoader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- com.puppycrawl.tools.checkstyle.api.AbstractLoader
-
- com.puppycrawl.tools.checkstyle.filters.SuppressionsLoader
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public final class SuppressionsLoader extends AbstractLoader
Loads a filter chain of suppressions.- Author:
- Rick Giles
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilterSet
loadSuppressions(String filename)
Returns the suppression filters in a specified file.void
startElement(String namespaceUri, String localName, String qName, Attributes attributes)
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractLoader
error, fatalError, parseInputSource, resolveEntity
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
startElement
public void startElement(String namespaceUri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
loadSuppressions
public static FilterSet loadSuppressions(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.
-
-