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
ConstructorsConstructorDescriptionFilter()Constructor for empty filterFilter(InputStream stream) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclear()booleanvoidvoidbooleaninthashCode()booleanisEmpty()booleanstatic voidbooleanmatch(BugInstance bugInstance) Determine whether or not the given BugInstance has the feature this Matcher tests for.static FilterparseFilter(String fileName) voidremoveChild(Matcher child) voidsetEnabled(Matcher m, boolean value) voidAdd if not present, but do not enable if already present and disabledvoidwriteAsXML(OutputStream out) voidwriteBodyAsXML(XMLOutput xmlOutput) voidMethods 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:
hashCodein classCompoundMatcher
-
equals
- Overrides:
equalsin 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:
addChildin classCompoundMatcher
-
removeChild
- Overrides:
removeChildin classCompoundMatcher
-
clear
public void clear()- Overrides:
clearin classCompoundMatcher
-
match
Description copied from interface:MatcherDetermine whether or not the given BugInstance has the feature this Matcher tests for. -
main
-
writeAsXML
- Throws:
IOException
-
writeEnabledMatchersAsXML
- Throws:
IOException
-
writeBodyAsXML
- Throws:
IOException
-