Package edu.umd.cs.findbugs.detect
Class CheckExpectedWarnings
java.lang.Object
edu.umd.cs.findbugs.detect.CheckExpectedWarnings
- All Implemented Interfaces:
Detector2
,FirstPassDetector
,NonReportingDetector
,Priorities
Check uses of the ExpectWarning and NoWarning annotations. This is for
internal testing of FindBugs (against findbugsTestCases).
- Author:
- David Hovemeyer
-
Field Summary
Fields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkAnnotation
(String bugCode, Collection<BugInstance> warnings, boolean expectWarnings, int priority, Integer rank, Integer num, Object methodDescriptor, int minPriority, ClassDescriptor cd) void
This method is called at the end of the analysis pass.Get the name of the detector class.makeWarning
(String bugPattern, Object descriptor, int priority, ClassDescriptor cd) void
visitClass
(ClassDescriptor classDescriptor) Visit a class.
-
Constructor Details
-
CheckExpectedWarnings
-
-
Method Details
-
visitClass
Description copied from interface:Detector2
Visit a class.- Specified by:
visitClass
in interfaceDetector2
- Parameters:
classDescriptor
- descriptor naming the class to visit- Throws:
CheckedAnalysisException
- if an exception occurs during analysis
-
checkAnnotation
public void checkAnnotation(@CheckForNull String bugCode, Collection<BugInstance> warnings, boolean expectWarnings, int priority, Integer rank, Integer num, Object methodDescriptor, int minPriority, ClassDescriptor cd) -
makeWarning
public BugInstance makeWarning(String bugPattern, Object descriptor, int priority, ClassDescriptor cd) -
finishPass
public void finishPass()Description copied from interface:Detector2
This method is called at the end of the analysis pass.- Specified by:
finishPass
in interfaceDetector2
-
getDetectorClassName
Description copied from interface:Detector2
Get the name of the detector class.- Specified by:
getDetectorClassName
in interfaceDetector2
- Returns:
- the name of the detector class.
-