public class SuppressionXpathFilter extends AutomaticBean implements TreeWalkerFilter, ExternalResourceHolder
AutomaticBean.OutputStreamOptions
Constructor and Description |
---|
SuppressionXpathFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(TreeWalkerAuditEvent treeWalkerAuditEvent)
Determines whether or not a filtered
TreeWalkerAuditEvent 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, setupChild
public SuppressionXpathFilter()
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(TreeWalkerAuditEvent treeWalkerAuditEvent)
TreeWalkerFilter
TreeWalkerAuditEvent
is accepted.accept
in interface TreeWalkerFilter
treeWalkerAuditEvent
- the TreeWalkerAuditEvent to filter.public Set<String> getExternalResourceLocations()
ExternalResourceHolder
NullPointerException
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 ExternalResourceHolder
protected void finishLocalSetup() throws CheckstyleException
AutomaticBean
The default implementation does nothing.
finishLocalSetup
in class AutomaticBean
CheckstyleException
- if there is a configuration error.Copyright © 2001–2018. All rights reserved.