com.puppycrawl.tools.checkstyle.filters
Class SuppressionsLoader

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bycom.puppycrawl.tools.checkstyle.api.AbstractLoader
          extended bycom.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 AbstractLoader

Loads a filter chain of suppressions.

Author:
Rick Giles

Method Summary
 FilterSet getFilterChain()
          Returns the loaded filter chain.
static FilterSet loadSuppressions(java.lang.String aFilename)
          Returns the suppression filters in a specified file.
 void startElement(java.lang.String aNamespaceURI, java.lang.String aLocalName, java.lang.String aQName, org.xml.sax.Attributes aAtts)
           
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractLoader
error, fatalError, parseInputSource, resolveEntity, warning
 
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
 

Method Detail

getFilterChain

public FilterSet getFilterChain()
Returns the loaded filter chain.

Returns:
the loaded filter chain.

startElement

public void startElement(java.lang.String aNamespaceURI,
                         java.lang.String aLocalName,
                         java.lang.String aQName,
                         org.xml.sax.Attributes aAtts)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException
See Also:
DefaultHandler

loadSuppressions

public static FilterSet loadSuppressions(java.lang.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.

Back to the Checkstyle Home Page