com.puppycrawl.tools.checkstyle.filters

Class SeverityMatchFilter

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

Method Summary

boolean
accept(AuditEvent aEvent)
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

Method Details

accept

public boolean accept(AuditEvent aEvent)
Specified by:
accept in interface Filter

See Also:
Filter


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.


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