Class SelfCalls
java.lang.Object
edu.umd.cs.findbugs.SelfCalls
Build a call graph of the self calls in a class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HashSet<org.apache.bcel.classfile.Method> private final CallGraphprivate final ClassContextprivate booleanprivate static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterator<org.apache.bcel.classfile.Method> Get an Iterator over self-called methods.Get an Iterator over all self call sites.voidexecute()Find the self calls.Get the self call graph for the class.booleanDoes this class contain any explicit synchronization?private org.apache.bcel.classfile.MethodisSelfCall(org.apache.bcel.generic.InvokeInstruction inv) Is the given instruction a self-call?private voidscan(CallGraphNode node) Scan a method for self call sites.booleanwantCallsFor(org.apache.bcel.classfile.Method method) Determine whether we are interested in calls for the given method.
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
classContext
-
callGraph
-
calledMethodSet
-
hasSynchronization
private boolean hasSynchronization
-
-
Constructor Details
-
SelfCalls
Constructor.- Parameters:
classContext- the ClassContext for the class
-
-
Method Details
-
execute
-
getCallGraph
Get the self call graph for the class. -
calledMethodIterator
Get an Iterator over self-called methods. -
wantCallsFor
public boolean wantCallsFor(org.apache.bcel.classfile.Method method) Determine whether we are interested in calls for the given method. Subclasses may override. The default version returns true for every method.- Parameters:
method- the method- Returns:
- true if we want call sites for the method, false if not
-
callSiteIterator
-
hasSynchronization
public boolean hasSynchronization()Does this class contain any explicit synchronization? -
scan
Scan a method for self call sites.- Parameters:
node- the CallGraphNode for the method to be scanned- Throws:
CFGBuilderException
-
isSelfCall
private org.apache.bcel.classfile.Method isSelfCall(org.apache.bcel.generic.InvokeInstruction inv) Is the given instruction a self-call?
-