com.puppycrawl.tools.checkstyle.filters
Class SuppressElement
- Filter
public class SuppressElement
This filter processes
AuditEvent
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.
SuppressElement(String aFiles) - Constructs a
SuppressElement for a
file name pattern.
|
boolean | accept(AuditEvent aEvent) -
|
boolean | equals(Object aObject) -
|
int | hashCode() -
|
void | setChecks(String aChecks) - Set the check class pattern.
|
void | setColumns(String aColumns) - Sets the CSV values and ranges for column number filtering.
|
void | setLines(String aLines) - Sets the CSV values and ranges for line number filtering.
|
void | setModuleId(String aModuleId) - Set the module id for filtering.
|
String | toString() -
|
SuppressElement
public SuppressElement(String aFiles)
throws PatternSyntaxException
aFiles
- regular expression for names of filtered files.
equals
public boolean equals(Object aObject)
hashCode
public int hashCode()
setChecks
public void setChecks(String aChecks)
Set the check class pattern.
aChecks
- regular expression for filtered check classes.
setColumns
public void setColumns(String aColumns)
Sets the CSV values and ranges for column number filtering.
E.g. "1,7-15,18".
aColumns
- CSV values and ranges for column number filtering.
setLines
public void setLines(String aLines)
Sets the CSV values and ranges for line number filtering.
E.g. "1,7-15,18".
aLines
- CSV values and ranges for line number filtering.
setModuleId
public void setModuleId(String aModuleId)
Set the module id for filtering. Cannot be null.
toString
public String toString()