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 boolean
accept(AuditEvent event)
Determines whether or not a filtered AuditEvent is accepted.protected void
finishLocalSetup()
Provides a hook to finish the part of this component's setup that was not handled by the bean introspection.void
setAcceptOnMatch(boolean acceptOnMatch)
Sets whether to accept or reject on matching severity level.void
setSeverity(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:AutomaticBean
Provides 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:
finishLocalSetup
in classAutomaticBean
-
accept
public boolean accept(AuditEvent event)
Description copied from interface:Filter
Determines whether or not a filtered AuditEvent is accepted.
-
-