public class SuppressionFilter extends AutomaticBean implements Filter, ExternalResourceHolder
This filter accepts AuditEvents according to file, check, line, and column, as specified in a suppression file.
AutomaticBean.OutputStreamOptions| Constructor and Description |
|---|
SuppressionFilter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(AuditEvent event)
Determines whether or not a filtered AuditEvent is accepted.
|
boolean |
equals(Object obj) |
protected void |
finishLocalSetup()
Provides a hook to finish the part of this component's setup that
was not handled by the bean introspection.
|
Set<String> |
getExternalResourceLocations()
Returns a set of external configuration resource locations which are used by the module.
|
int |
hashCode() |
void |
setFile(String fileName)
Sets name of the suppression file.
|
void |
setOptional(boolean optional)
Sets whether config file existence is optional.
|
configure, contextualize, getConfiguration, setupChildpublic SuppressionFilter()
public void setFile(String fileName)
fileName - name of the suppressions file.public void setOptional(boolean optional)
optional - tells if config file existence is optional.public boolean accept(AuditEvent event)
Filterprotected void finishLocalSetup() throws CheckstyleException
AutomaticBeanThe default implementation does nothing.
finishLocalSetup in class AutomaticBeanCheckstyleException - if there is a configuration error.public Set<String> getExternalResourceLocations()
ExternalResourceHolderNullPointerException in Checker.
Such behaviour will signal that your module (check or filter) is designed incorrectly.
It make sense to return an empty set from 'getExternalResourceLocations()'
only for composite modules like TreeWalker.getExternalResourceLocations in interface ExternalResourceHolderCopyright © 2001–2018. All rights reserved.