Class FieldWarningSuppressor
java.lang.Object
edu.umd.cs.findbugs.WarningSuppressor
edu.umd.cs.findbugs.ClassWarningSuppressor
edu.umd.cs.findbugs.FieldWarningSuppressor
- All Implemented Interfaces:
Matcher
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String(package private) FieldAnnotationprivate final booleanIndicates whether this field was "user generated" as defined inMemberUtils.isUserGenerated(org.apache.bcel.classfile.FieldOrMethod)When a field is not user generated we are not interested in reporting warnings, in particular we do not want to report US_USELESS_SUPPRESSION_ON_FIELDFields inherited from class ClassWarningSuppressor
clazzFields inherited from class WarningSuppressor
bugPattern, DEBUG, matchType, PRIORITY, USELESS_SUPPRESSION_ABB -
Constructor Summary
ConstructorsConstructorDescriptionFieldWarningSuppressor(String bugPattern, SuppressMatchType matchType, ClassAnnotation clazz, FieldAnnotation field, boolean userGeneratedClass, boolean userGeneratedField) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanmatch(BugInstance bugInstance) Determine whether or not the given BugInstance has the feature this Matcher tests for.toString()Methods inherited from class ClassWarningSuppressor
getClassAnnotationMethods inherited from class WarningSuppressor
addAlternateSuppressors, adjustBugPatternForMessage, getAlternateSuppressors, writeXML
-
Field Details
-
BUG_TYPE
- See Also:
-
field
FieldAnnotation field -
userGeneratedField
private final boolean userGeneratedFieldIndicates whether this field was "user generated" as defined inMemberUtils.isUserGenerated(org.apache.bcel.classfile.FieldOrMethod)When a field is not user generated we are not interested in reporting warnings, in particular we do not want to report US_USELESS_SUPPRESSION_ON_FIELD
-
-
Constructor Details
-
FieldWarningSuppressor
public FieldWarningSuppressor(String bugPattern, SuppressMatchType matchType, ClassAnnotation clazz, FieldAnnotation field, boolean userGeneratedClass, boolean userGeneratedField)
-
-
Method Details
-
toString
-
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 classClassWarningSuppressor- Parameters:
bugInstance- the BugInstance- Returns:
- true if the BugInstance matches, false if not
-
buildUselessSuppressionBugInstance
- Overrides:
buildUselessSuppressionBugInstancein classClassWarningSuppressor
-
isUselessSuppressionReportable
public boolean isUselessSuppressionReportable()- Overrides:
isUselessSuppressionReportablein classClassWarningSuppressor- Returns:
- true if useless suppressions should be reported.
-