Package edu.umd.cs.findbugs
Class WarningSuppressor
- java.lang.Object
-
- edu.umd.cs.findbugs.WarningSuppressor
-
- All Implemented Interfaces:
Matcher
- Direct Known Subclasses:
ClassWarningSuppressor,PackageWarningSuppressor
public abstract class WarningSuppressor extends java.lang.Object implements Matcher
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<WarningSuppressor>alternateSuppressorsprotected java.lang.StringbugPattern(package private) static booleanDEBUGprotected SuppressMatchTypematchTypeprotected static intPRIORITYprotected static java.lang.StringUSELESS_SUPPRESSION_ABB
-
Constructor Summary
Constructors Modifier Constructor Description protectedWarningSuppressor(java.lang.String bugPattern, SuppressMatchType matchType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddAlternateSuppressors(java.util.Collection<WarningSuppressor> additionalSuppressors)protected java.lang.StringadjustBugPatternForMessage()abstract BugInstancebuildUselessSuppressionBugInstance(UselessSuppressionDetector detector)java.util.Collection<WarningSuppressor>getAlternateSuppressors()booleanisUselessSuppressionReportable()booleanmatch(BugInstance bugInstance)Determine whether or not the given BugInstance has the feature this Matcher tests for.voidwriteXML(XMLOutput xmlOutput, boolean disabled)
-
-
-
Field Detail
-
USELESS_SUPPRESSION_ABB
protected static final java.lang.String USELESS_SUPPRESSION_ABB
- See Also:
- Constant Field Values
-
PRIORITY
protected static final int PRIORITY
- See Also:
- Constant Field Values
-
DEBUG
static final boolean DEBUG
-
bugPattern
protected final java.lang.String bugPattern
-
matchType
protected final SuppressMatchType matchType
-
alternateSuppressors
private java.util.Set<WarningSuppressor> alternateSuppressors
-
-
Constructor Detail
-
WarningSuppressor
protected WarningSuppressor(java.lang.String bugPattern, SuppressMatchType matchType)
-
-
Method Detail
-
match
public boolean match(BugInstance bugInstance)
Description copied from interface:MatcherDetermine whether or not the given BugInstance has the feature this Matcher tests for.
-
isUselessSuppressionReportable
public boolean isUselessSuppressionReportable()
- Returns:
- true if useless suppressions should be reported.
-
buildUselessSuppressionBugInstance
public abstract BugInstance buildUselessSuppressionBugInstance(UselessSuppressionDetector detector)
-
writeXML
public void writeXML(XMLOutput xmlOutput, boolean disabled) throws java.io.IOException
-
addAlternateSuppressors
public void addAlternateSuppressors(java.util.Collection<WarningSuppressor> additionalSuppressors)
-
getAlternateSuppressors
public java.util.Collection<WarningSuppressor> getAlternateSuppressors()
- Returns:
- The alternate suppressors that might have been generated from a single
SuppressWarningsannotation. SeeNoteSuppressedWarnings
-
adjustBugPatternForMessage
protected java.lang.String adjustBugPatternForMessage()
-
-