com.puppycrawl.tools.checkstyle.filters

Class SeverityMatchFilter

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
booleanaccept(AuditEvent aEvent)
{@inheritDoc}
voidsetAcceptOnMatch(boolean aAcceptOnMatch)
Sets whether to accept or reject on matching severity level.
voidsetSeverity(String aSeverity)
Sets the severity level.

Method Detail

accept

public boolean accept(AuditEvent aEvent)
{@inheritDoc}

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