com.puppycrawl.tools.checkstyle.filters
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
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getFilterChain
public FilterSet getFilterChain()
- Returns the loaded filter chain.
- Returns:
- the loaded filter chain.
startElement
public void startElement(String aNamespaceURI,
String aLocalName,
String aQName,
Attributes aAtts)
throws SAXException
-
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class DefaultHandler
- Throws:
SAXException
loadSuppressions
public static FilterSet loadSuppressions(String aFilename)
throws CheckstyleException
- Returns the suppression filters in a specified file.
- Parameters:
aFilename
- name of the suppresssions file.
- Returns:
- the filter chain of suppression elements specified in the file.
- Throws:
CheckstyleException
- if an error occurs.