com.puppycrawl.tools.checkstyle.filters

Class SuppressElement

Implemented Interfaces:
Filter

public class SuppressElement
extends Object
implements Filter

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:
Author:
Rick Giles

Constructor Summary

SuppressElement(String aFiles)
Constructs a SuppressElement for a file name pattern.

Method Summary

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()

Constructor Details

SuppressElement

public SuppressElement(String aFiles)
            throws PatternSyntaxException
Parameters:
aFiles - regular expression for names of filtered files.

Method Details

accept

public boolean accept(AuditEvent aEvent)
Specified by:
accept in interface Filter

equals

public boolean equals(Object aObject)

hashCode

public int hashCode()

setChecks

public void setChecks(String aChecks)
Set the check class pattern.
Parameters:
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".
Parameters:
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".
Parameters:
aLines - CSV values and ranges for line number filtering.

setModuleId

public void setModuleId(String aModuleId)
Set the module id for filtering. Cannot be null.
Parameters:
aModuleId - the id

toString

public String toString()