Package edu.umd.cs.findbugs.detect
Class CheckExpectedWarnings
- java.lang.Object
-
- edu.umd.cs.findbugs.detect.CheckExpectedWarnings
-
- All Implemented Interfaces:
Detector2,FirstPassDetector,NonReportingDetector,Priorities
public class CheckExpectedWarnings extends java.lang.Object implements Detector2, NonReportingDetector
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 Constructor Description CheckExpectedWarnings(BugReporter bugReporter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckAnnotation(java.lang.String bugCode, java.util.Collection<BugInstance> warnings, boolean expectWarnings, int priority, java.lang.Integer rank, java.lang.Integer num, java.lang.Object methodDescriptor, int minPriority, ClassDescriptor cd)voidfinishPass()This method is called at the end of the analysis pass.java.lang.StringgetDetectorClassName()Get the name of the detector class.BugInstancemakeWarning(java.lang.String bugPattern, java.lang.Object descriptor, int priority, ClassDescriptor cd)voidvisitClass(ClassDescriptor classDescriptor)Visit a class.
-
-
-
Constructor Detail
-
CheckExpectedWarnings
public CheckExpectedWarnings(BugReporter bugReporter)
-
-
Method Detail
-
visitClass
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException
Description copied from interface:Detector2Visit a class.- Specified by:
visitClassin interfaceDetector2- Parameters:
classDescriptor- descriptor naming the class to visit- Throws:
CheckedAnalysisException- if an exception occurs during analysis
-
checkAnnotation
public void checkAnnotation(@CheckForNull java.lang.String bugCode, java.util.Collection<BugInstance> warnings, boolean expectWarnings, int priority, java.lang.Integer rank, java.lang.Integer num, java.lang.Object methodDescriptor, int minPriority, ClassDescriptor cd)
-
makeWarning
public BugInstance makeWarning(java.lang.String bugPattern, java.lang.Object descriptor, int priority, ClassDescriptor cd)
-
finishPass
public void finishPass()
Description copied from interface:Detector2This method is called at the end of the analysis pass.- Specified by:
finishPassin interfaceDetector2
-
getDetectorClassName
public java.lang.String getDetectorClassName()
Description copied from interface:Detector2Get the name of the detector class.- Specified by:
getDetectorClassNamein interfaceDetector2- Returns:
- the name of the detector class.
-
-