Package edu.umd.cs.findbugs.bcel
Class CFGDetector
- java.lang.Object
-
- edu.umd.cs.findbugs.bcel.CFGDetector
-
- All Implemented Interfaces:
Detector2
,Priorities
- Direct Known Subclasses:
CheckTypeQualifiers
,FindUnsatisfiedObligation
public abstract class CFGDetector extends java.lang.Object implements Detector2
Base class for detectors that analyze CFG (and/or use CFG-based analyses).- Author:
- David Hovemeyer
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassContext
classContext
protected org.apache.bcel.classfile.Method
method
-
Fields inherited from interface edu.umd.cs.findbugs.Priorities
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description CFGDetector()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
finishPass()
This method is called at the end of the analysis pass.java.lang.String
getDetectorClassName()
Get the name of the detector class.void
visitClass(ClassDescriptor classDescriptor)
Visit a class.protected abstract void
visitMethodCFG(MethodDescriptor methodDescriptor, CFG cfg)
Visit the CFG (control flow graph) of a method to be analyzed.
-
-
-
Field Detail
-
classContext
protected ClassContext classContext
-
method
protected org.apache.bcel.classfile.Method method
-
-
Method Detail
-
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
public java.lang.String 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.
-
visitClass
public void visitClass(ClassDescriptor classDescriptor) throws CheckedAnalysisException
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
-
visitMethodCFG
protected abstract void visitMethodCFG(MethodDescriptor methodDescriptor, CFG cfg) throws CheckedAnalysisException
Visit the CFG (control flow graph) of a method to be analyzed. Should be overridded by subclasses.- Parameters:
methodDescriptor
-cfg
-- Throws:
CheckedAnalysisException
-
-