Package edu.umd.cs.findbugs.detect
Class CheckExpectedWarnings
- java.lang.Object
-
- edu.umd.cs.findbugs.detect.CheckExpectedWarnings
-
- All Implemented Interfaces:
Detector2
,FirstPassDetector
,NonReportingDetector
,Priorities
@Deprecated public class CheckExpectedWarnings extends java.lang.Object implements Detector2, NonReportingDetector
Deprecated.The annotation based approach is useless for lambdas. Write expectations usingedu.umd.cs.findbugs.test.matcher.BugInstanceMatcher
matchers in test source directoryCheck uses of the ExpectWarning and NoWarning annotations. This is for internal testing of FindBugs (against spotbugsTestCases).
-
-
Field Summary
Fields Modifier and Type Field Description private BugCollection
bugCollection
Deprecated.private static boolean
DEBUG
Deprecated.private ClassDescriptor
desireNoWarning
Deprecated.private ClassDescriptor
desireWarning
Deprecated.private ClassDescriptor
expectWarning
Deprecated.private boolean
initialized
Deprecated.private ClassDescriptor
noWarning
Deprecated.private BugReporter
reporter
Deprecated.private boolean
warned
Deprecated.private java.util.Map<ClassDescriptor,java.util.Collection<BugInstance>>
warningsByClass
Deprecated.private java.util.Map<FieldDescriptor,java.util.Collection<BugInstance>>
warningsByField
Deprecated.private java.util.Map<MethodDescriptor,java.util.Collection<BugInstance>>
warningsByMethod
Deprecated.-
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)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private void
check(XClass xclass, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.private void
check(XField xfield, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.private void
check(XMethod xmethod, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.private void
check(AnnotationValue expect, java.lang.Object descriptor, java.util.Collection<BugInstance> warnings, boolean expectWarnings, int priority, ClassDescriptor cd)
Deprecated.void
checkAnnotation(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)
Deprecated.private static java.util.Collection<SourceLineAnnotation>
countWarnings(java.util.Collection<BugInstance> warnings, java.lang.String bugCode, int desiredPriority, int rank)
Deprecated.void
finishPass()
Deprecated.This method is called at the end of the analysis pass.java.lang.String
getDetectorClassName()
Deprecated.Get the name of the detector class.BugInstance
makeWarning(java.lang.String bugPattern, java.lang.Object descriptor, int priority, ClassDescriptor cd)
Deprecated.void
visitClass(ClassDescriptor classDescriptor)
Deprecated.Visit a class.
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
Deprecated.
-
reporter
private BugReporter reporter
Deprecated.
-
bugCollection
private final BugCollection bugCollection
Deprecated.
-
initialized
private boolean initialized
Deprecated.
-
warningsByClass
private java.util.Map<ClassDescriptor,java.util.Collection<BugInstance>> warningsByClass
Deprecated.
-
warningsByMethod
private java.util.Map<MethodDescriptor,java.util.Collection<BugInstance>> warningsByMethod
Deprecated.
-
warningsByField
private java.util.Map<FieldDescriptor,java.util.Collection<BugInstance>> warningsByField
Deprecated.
-
expectWarning
private ClassDescriptor expectWarning
Deprecated.
-
noWarning
private ClassDescriptor noWarning
Deprecated.
-
desireWarning
private ClassDescriptor desireWarning
Deprecated.
-
desireNoWarning
private ClassDescriptor desireNoWarning
Deprecated.
-
warned
private boolean warned
Deprecated.
-
-
Constructor Detail
-
CheckExpectedWarnings
public CheckExpectedWarnings(BugReporter bugReporter)
Deprecated.
-
-
Method Detail
-
visitClass
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException
Deprecated.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
-
check
private void check(XClass xclass, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.
-
check
private void check(XMethod xmethod, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.
-
check
private void check(XField xfield, ClassDescriptor annotation, boolean expectWarnings, int priority)
Deprecated.
-
check
private void check(AnnotationValue expect, java.lang.Object descriptor, java.util.Collection<BugInstance> warnings, boolean expectWarnings, int priority, ClassDescriptor cd)
Deprecated.
-
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)
Deprecated.
-
makeWarning
public BugInstance makeWarning(java.lang.String bugPattern, java.lang.Object descriptor, int priority, ClassDescriptor cd)
Deprecated.
-
countWarnings
private static java.util.Collection<SourceLineAnnotation> countWarnings(java.util.Collection<BugInstance> warnings, @CheckForNull java.lang.String bugCode, int desiredPriority, int rank)
Deprecated.
-
finishPass
public void finishPass()
Deprecated.Description copied from interface:Detector2
This method is called at the end of the analysis pass.- Specified by:
finishPass
in interfaceDetector2
-
getDetectorClassName
public java.lang.String getDetectorClassName()
Deprecated.Description copied from interface:Detector2
Get the name of the detector class.- Specified by:
getDetectorClassName
in interfaceDetector2
- Returns:
- the name of the detector class.
-
-