Class ClassWarningSuppressor
java.lang.Object
edu.umd.cs.findbugs.WarningSuppressor
edu.umd.cs.findbugs.ClassWarningSuppressor
- All Implemented Interfaces:
Matcher
- Direct Known Subclasses:
FieldWarningSuppressor, MethodWarningSuppressor, ParameterWarningSuppressor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String(package private) ClassAnnotationprivate final booleanIndicates whether this class was "user generated" as defined inMemberUtils.isUserGenerated(edu.umd.cs.findbugs.ba.XClass)When a class is not user generated we are not interested in reporting warnings, in particular we do not want to report US_USELESS_SUPPRESSION_ON_CLASSFields inherited from class WarningSuppressor
bugPattern, DEBUG, matchType, PRIORITY, USELESS_SUPPRESSION_ABB -
Constructor Summary
ConstructorsConstructorDescriptionClassWarningSuppressor(String bugPattern, SuppressMatchType matchType, ClassAnnotation clazz, boolean userGeneratedClass) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanmatch(BugInstance bugInstance) Determine whether or not the given BugInstance has the feature this Matcher tests for.Methods inherited from class WarningSuppressor
addAlternateSuppressors, adjustBugPatternForMessage, getAlternateSuppressors, writeXML
-
Field Details
-
BUG_TYPE
- See Also:
-
clazz
ClassAnnotation clazz -
userGeneratedClass
private final boolean userGeneratedClassIndicates whether this class was "user generated" as defined inMemberUtils.isUserGenerated(edu.umd.cs.findbugs.ba.XClass)When a class is not user generated we are not interested in reporting warnings, in particular we do not want to report US_USELESS_SUPPRESSION_ON_CLASS
-
-
Constructor Details
-
ClassWarningSuppressor
public ClassWarningSuppressor(String bugPattern, SuppressMatchType matchType, ClassAnnotation clazz, boolean userGeneratedClass) - Parameters:
userGeneratedClass-
-
-
Method Details
-
getClassAnnotation
-
buildUselessSuppressionBugInstance
- Specified by:
buildUselessSuppressionBugInstancein classWarningSuppressor
-
match
Description copied from interface:MatcherDetermine whether or not the given BugInstance has the feature this Matcher tests for.- Specified by:
matchin interfaceMatcher- Overrides:
matchin classWarningSuppressor- Parameters:
bugInstance- the BugInstance- Returns:
- true if the BugInstance matches, false if not
-
isUselessSuppressionReportable
public boolean isUselessSuppressionReportable()- Overrides:
isUselessSuppressionReportablein classWarningSuppressor- Returns:
- true if useless suppressions should be reported.
-