com.puppycrawl.tools.checkstyle.filters
Class SuppressionFilter

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.puppycrawl.tools.checkstyle.filters.SuppressionFilter
All Implemented Interfaces:
Configurable, Contextualizable, Filter

public class SuppressionFilter
extends AutomaticBean
implements Filter

This filter accepts AuditEvents according to file, check, line, and column, as specified in a suppression file.

Author:
Rick Giles

Constructor Summary
SuppressionFilter()
           
 
Method Summary
 boolean accept(AuditEvent aEvent)
          Determines whether or not a filtered AuditEvent is accepted.
 boolean equals(java.lang.Object aObject)
           
 int hashCode()
           
 void setFile(java.lang.String aFileName)
          Loads the suppressions for a file.
 java.lang.String toString()
           
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SuppressionFilter

public SuppressionFilter()
Method Detail

setFile

public void setFile(java.lang.String aFileName)
             throws CheckstyleException
Loads the suppressions for a file.

Parameters:
aFileName - name of the suppressions file.
Throws:
CheckstyleException - if there is an error.

accept

public boolean accept(AuditEvent aEvent)
Description copied from interface: Filter
Determines whether or not a filtered AuditEvent is accepted.

Specified by:
accept in interface Filter
Parameters:
aEvent - the AudtiEvent to filter.
Returns:
true if the aEvent is accepted.
See Also:
Filter

toString

public java.lang.String toString()
See Also:
Object.toString()

hashCode

public int hashCode()
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object aObject)
See Also:
Object.equals(java.lang.Object)

Back to the Checkstyle Home Page