## com.puppycrawl.tools.checkstyle.filters
Class SeverityMatchFilter

    java.lang.Object
      com.puppycrawl.tools.checkstyle.api.AutomaticBean
          com.puppycrawl.tools.checkstyle.filters.SeverityMatchFilter

All Implemented Interfaces:
  Configurable, Contextualizable, Filter

    public class SeverityMatchFilter

extends AutomaticBean
implements Filter

This is a very simple filter based on severity matching. The filter admits option severity and accepts an AuditEvent if its severity equals the filter's severity.

Author:
  Rick Giles

Constructor Summary
`SeverityMatchFilter()`

Method Summary
`boolean` `accept(AuditEvent aEvent)` Determines whether or not a filtered AuditEvent is accepted.
`void` `setAcceptOnMatch(boolean aAcceptOnMatch)` Sets whether to accept or reject on matching severity level.
`void` `setSeverity(String aSeverity)` Sets the severity level.

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
`configure, contextualize, finishLocalSetup, getConfiguration, setupChild`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SeverityMatchFilter

    public SeverityMatchFilter()

Method Detail

### setSeverity

    public final void setSeverity(String aSeverity)

  Sets the severity level. The string should be one of the names defined in the `SeverityLevel` class.

  Parameters:
    `aSeverity` - The new severity level
  See Also:
    `SeverityLevel`

### setAcceptOnMatch

    public final void setAcceptOnMatch(boolean aAcceptOnMatch)

  Sets whether to accept or reject on matching severity level.

  Parameters:
    `aAcceptOnMatch` - if true, accept on matches; if false, reject on matches.

### accept

    public boolean accept(AuditEvent aEvent)

  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.

Copyright © 2001-2011. All Rights Reserved.