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 void
addChild(Matcher child)
void
clear()
boolean
contains(Matcher child)
void
disable(Matcher m)
void
enable(Matcher m)
boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
isEmpty()
boolean
isEnabled(Matcher m)
static void
main(java.lang.String[] argv)
boolean
match(BugInstance bugInstance)
Determine whether or not the given BugInstance has the feature this Matcher tests for.static Filter
parseFilter(java.lang.String fileName)
void
removeChild(Matcher child)
void
setEnabled(Matcher m, boolean value)
void
softAdd(Matcher child)
Add if not present, but do not enable if already present and disabledvoid
writeAsXML(java.io.OutputStream out)
void
writeBodyAsXML(XMLOutput xmlOutput)
void
writeEnabledMatchersAsXML(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.IOException
Constructor.- Parameters:
fileName
- name of the filter file- Throws:
java.io.IOException
-
Filter
public Filter(java.io.InputStream stream) throws java.io.IOException
Constructor.- Parameters:
stream
- content of the filter file- Throws:
java.io.IOException
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classCompoundMatcher
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in 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:
addChild
in classCompoundMatcher
-
removeChild
public void removeChild(Matcher child)
- Overrides:
removeChild
in classCompoundMatcher
-
clear
public void clear()
- Overrides:
clear
in classCompoundMatcher
-
match
public boolean match(BugInstance bugInstance)
Description copied from interface:Matcher
Determine 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
-
-