Class SuppressElement
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.filters.SuppressElement
-
- All Implemented Interfaces:
Filter
public class SuppressElement extends java.lang.Object implements Filter
This filter processesAuditEvent
objects based on the criteria of file, check, module id, line, and column. It rejects an AuditEvent if the following match:- the event's file name; and
- the check name or the module identifier; and
- (optionally) the event's line is in the filter's line CSV; and
- (optionally) the check's columns is in the filter's column CSV.
-
-
Constructor Summary
Constructors Constructor Description SuppressElement(java.lang.String files, java.lang.String checks, java.lang.String message, java.lang.String modId, java.lang.String lines, java.lang.String columns)
Constructs aSuppressElement
for a file name pattern.
-
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.boolean
equals(java.lang.Object other)
int
hashCode()
-
-
-
Constructor Detail
-
SuppressElement
public SuppressElement(java.lang.String files, java.lang.String checks, java.lang.String message, java.lang.String modId, java.lang.String lines, java.lang.String columns)
Constructs aSuppressElement
for a file name pattern.- Parameters:
files
- regular expression for names of filtered files.checks
- regular expression for filtered check classes.message
- regular expression for messages.modId
- the idlines
- lines CSV values and ranges for line number filtering.columns
- columns CSV values and ranges for column number filtering.
-
-
Method Detail
-
accept
public boolean accept(AuditEvent event)
Description copied from interface:Filter
Determines whether or not a filtered AuditEvent is accepted.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-