|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ByteCodePatternDetector
public abstract class ByteCodePatternDetector
A base class for bug detectors that are based on a ByteCodePattern. ByteCodePatterns provide an easy way to detect patterns of bytecode instructions, taking into account control flow and uses of fields and values.
ByteCodePattern
Field Summary |
---|
Fields inherited from interface edu.umd.cs.findbugs.Priorities |
---|
EXP_PRIORITY, HIGH_PRIORITY, IGNORE_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY |
Constructor Summary | |
---|---|
ByteCodePatternDetector()
|
Method Summary | |
---|---|
protected abstract BugReporter |
getBugReporter()
|
abstract ByteCodePattern |
getPattern()
Get the ByteCodePattern for this detector. |
abstract boolean |
prescreen(org.apache.bcel.classfile.Method method,
ClassContext classContext)
Prescreen a method. |
void |
report()
This method is called after all classes to be visited. |
abstract void |
reportMatch(ClassContext classContext,
org.apache.bcel.classfile.Method method,
ByteCodePatternMatch match)
Called to report an instance of the ByteCodePattern. |
void |
visitClassContext(ClassContext classContext)
Visit the ClassContext for a class which should be analyzed for instances of bug patterns. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ByteCodePatternDetector()
Method Detail |
---|
protected abstract BugReporter getBugReporter()
public void visitClassContext(ClassContext classContext)
Detector
visitClassContext
in interface Detector
classContext
- the ClassContextpublic void report()
Detector
report
in interface Detector
public abstract ByteCodePattern getPattern()
public abstract boolean prescreen(org.apache.bcel.classfile.Method method, ClassContext classContext)
As a datapoint, prescreening speeds up the BCPDoubleCheck detector by a factor of 5 with no loss of generality and only a dozen or so extra lines of code.
method
- the methodclassContext
- the ClassContext for the method
public abstract void reportMatch(ClassContext classContext, org.apache.bcel.classfile.Method method, ByteCodePatternMatch match) throws CFGBuilderException, DataflowAnalysisException
classContext
- the ClassContext for the analyzed classmethod
- the method to instance appears inmatch
- the ByteCodePatternMatch object representing the match
of the ByteCodePattern against actual instructions in the method
CFGBuilderException
DataflowAnalysisException
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |