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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
AutomaticBean.OutputStreamOptions
-
-
Constructor Summary
Constructors Constructor Description SeverityMatchFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(AuditEvent event)Determines whether or not a filtered AuditEvent is accepted.protected voidfinishLocalSetup()Provides a hook to finish the part of this component's setup that was not handled by the bean introspection.voidsetAcceptOnMatch(boolean acceptOnMatch)Sets whether to accept or reject on matching severity level.voidsetSeverity(SeverityLevel severity)Sets the severity level.-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, getConfiguration, setupChild
-
-
-
-
Method Detail
-
setSeverity
public final void setSeverity(SeverityLevel severity)
Sets the severity level.- Parameters:
severity- The new severity level- See Also:
SeverityLevel
-
setAcceptOnMatch
public final void setAcceptOnMatch(boolean acceptOnMatch)
Sets whether to accept or reject on matching severity level.- Parameters:
acceptOnMatch- if true, accept on matches; if false, reject on matches.
-
finishLocalSetup
protected void finishLocalSetup()
Description copied from class:AutomaticBeanProvides a hook to finish the part of this component's setup that was not handled by the bean introspection.The default implementation does nothing.
- Specified by:
finishLocalSetupin classAutomaticBean
-
accept
public boolean accept(AuditEvent event)
Description copied from interface:FilterDetermines whether or not a filtered AuditEvent is accepted.
-
-