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
-
-
Field Summary
-
Fields inherited from class edu.umd.cs.findbugs.filter.CompoundMatcher
children
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(Matcher child)voidclear()booleancontains(Matcher child)voiddisable(Matcher m)voidenable(Matcher m)booleanequals(java.lang.Object obj)inthashCode()booleanisEmpty()booleanisEnabled(Matcher m)static voidmain(java.lang.String[] argv)booleanmatch(BugInstance bugInstance)Determine whether or not the given BugInstance has the feature this Matcher tests for.static FilterparseFilter(java.lang.String fileName)voidremoveChild(Matcher child)voidsetEnabled(Matcher m, boolean value)voidsoftAdd(Matcher child)Add if not present, but do not enable if already present and disabledvoidwriteAsXML(java.io.OutputStream out)voidwriteBodyAsXML(XMLOutput xmlOutput)voidwriteEnabledMatchersAsXML(java.io.OutputStream out)-
Methods inherited from class edu.umd.cs.findbugs.filter.CompoundMatcher
childIterator, getChildren, maxChildren, numberChildren, writeChildrenXML
-
-
-
-
Constructor Detail
-
Filter
public Filter()
Constructor for empty filter
-
Filter
public Filter(java.lang.String fileName) throws java.io.IOExceptionConstructor.- Parameters:
fileName- name of the filter file- Throws:
java.io.IOException
-
Filter
public Filter(java.io.InputStream stream) throws java.io.IOExceptionConstructor.- Parameters:
stream- content of the filter file- Throws:
java.io.IOException
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCodein classCompoundMatcher
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classCompoundMatcher
-
isEmpty
public boolean isEmpty()
-
setEnabled
public void setEnabled(Matcher m, boolean value)
-
disable
public void disable(Matcher m)
-
isEnabled
public boolean isEnabled(Matcher m)
-
enable
public void enable(Matcher m)
-
parseFilter
public static Filter parseFilter(java.lang.String fileName) throws java.io.IOException
- Throws:
java.io.IOException
-
contains
public boolean contains(Matcher child)
-
softAdd
public void softAdd(Matcher child)
Add if not present, but do not enable if already present and disabled- Parameters:
child-
-
addChild
public void addChild(Matcher child)
- Overrides:
addChildin classCompoundMatcher
-
removeChild
public void removeChild(Matcher child)
- Overrides:
removeChildin classCompoundMatcher
-
clear
public void clear()
- Overrides:
clearin classCompoundMatcher
-
match
public boolean match(BugInstance bugInstance)
Description copied from interface:MatcherDetermine whether or not the given BugInstance has the feature this Matcher tests for.
-
main
public static void main(java.lang.String[] argv)
-
writeAsXML
public void writeAsXML(@WillClose java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
writeEnabledMatchersAsXML
public void writeEnabledMatchersAsXML(@WillClose java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
writeBodyAsXML
public void writeBodyAsXML(XMLOutput xmlOutput) throws java.io.IOException
- Throws:
java.io.IOException
-
-