Package edu.umd.cs.findbugs.filter
Class Filter
java.lang.Object
edu.umd.cs.findbugs.filter.CompoundMatcher
edu.umd.cs.findbugs.filter.OrMatcher
edu.umd.cs.findbugs.filter.Filter
- All Implemented Interfaces:
Matcher
Filter to match a subset of BugInstances. The filter criteria are read from
an XML file.
- Author:
- David Hovemeyer
-
Field Summary
Fields inherited from class edu.umd.cs.findbugs.filter.CompoundMatcher
children
-
Constructor Summary
ConstructorDescriptionFilter()
Constructor for empty filterFilter
(InputStream stream) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
clear()
boolean
void
void
boolean
int
hashCode()
boolean
isEmpty()
boolean
static void
boolean
match
(BugInstance bugInstance) Determine whether or not the given BugInstance has the feature this Matcher tests for.static Filter
parseFilter
(String fileName) void
removeChild
(Matcher child) void
setEnabled
(Matcher m, boolean value) void
Add if not present, but do not enable if already present and disabledvoid
writeAsXML
(OutputStream out) void
writeBodyAsXML
(XMLOutput xmlOutput) void
Methods inherited from class edu.umd.cs.findbugs.filter.CompoundMatcher
childIterator, getChildren, maxChildren, numberChildren, writeChildrenXML
-
Constructor Details
-
Filter
public Filter()Constructor for empty filter -
Filter
Constructor.- Parameters:
fileName
- name of the filter file- Throws:
IOException
-
Filter
Constructor.- Parameters:
stream
- content of the filter file- Throws:
IOException
-
-
Method Details
-
hashCode
public int hashCode()- Overrides:
hashCode
in classCompoundMatcher
-
equals
- Overrides:
equals
in classCompoundMatcher
-
isEmpty
public boolean isEmpty() -
setEnabled
-
disable
-
isEnabled
-
enable
-
parseFilter
- Throws:
IOException
-
contains
-
softAdd
Add if not present, but do not enable if already present and disabled- Parameters:
child
-
-
addChild
- Overrides:
addChild
in classCompoundMatcher
-
removeChild
- Overrides:
removeChild
in classCompoundMatcher
-
clear
public void clear()- Overrides:
clear
in classCompoundMatcher
-
match
Description copied from interface:Matcher
Determine whether or not the given BugInstance has the feature this Matcher tests for. -
main
-
writeAsXML
- Throws:
IOException
-
writeEnabledMatchersAsXML
- Throws:
IOException
-
writeBodyAsXML
- Throws:
IOException
-