Package sootup.callgraph
Interface CallGraph
- All Known Subinterfaces:
MutableCallGraph
- All Known Implementing Classes:
GraphBasedCallGraph
,OnFlyCallGraph
public interface CallGraph
The interface of all implemented call graph data structures
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
This method counts every edge in the call graph.callsFrom
(MethodSignature sourceMethod) This method returns all method signatures that are called by a given method signature.callSourcesTo
(MethodSignature targetMethod) This method returns all method signatures that call a given method signature.callsTo
(MethodSignature targetMethod) This method returns all method signatures that call a given method signature.callTargetsFrom
(MethodSignature sourceMethod) This method returns all method signatures that are called by a given method signature.boolean
containsCall
(CallGraph.Call call) This method checks if an edge is contained in the call graph.boolean
containsCall
(MethodSignature sourceMethod, MethodSignature targetMethod, InvokableStmt invokableStmt) This method checks if an edge is contained in the call graph.boolean
containsMethod
(MethodSignature method) This method checks if a given method signature is a node in the call graph.copy()
This method copies a call graph.This method compares the difference between the current call graph and call graph passed into the argument.This method converts the call graph object into dot format and write it to a string file.This method returns all entry methods of the call graphThis method returns method signatures in the call graph.
-
Method Details
-
getMethodSignatures
This method returns method signatures in the call graph. A method signature is a node in the call graph.- Returns:
- a set containing all method signatures in the call graph.
-
callTargetsFrom
This method returns all method signatures that are called by a given method signature. It returns the targets of outgoing edges of the given node (method signature) in the call graph- Parameters:
sourceMethod
- the method signature of the requested node in the call graph- Returns:
- a set of method signatures that are reached by a direct outgoing edge in the call graph
-
callSourcesTo
This method returns all method signatures that call a given method signature. It returns the sources of incoming edges of the given node (method signature) in the call graph- Parameters:
targetMethod
- the method signature of the requested node in the call graph- Returns:
- a set of method signatures that reach the targetMethod by a direct edge in the call graph
-
callsFrom
This method returns all method signatures that are called by a given method signature. It returns the targets of outgoing edges of the given node (method signature) in the call graph- Parameters:
sourceMethod
- the method signature of the requested node in the call graph- Returns:
- a set of method signatures that are reached by a direct outgoing edge in the call graph
-
callsTo
This method returns all method signatures that call a given method signature. It returns the sources of incoming edges of the given node (method signature) in the call graph- Parameters:
targetMethod
- the method signature of the requested node in the call graph- Returns:
- a set of method signatures that reach the targetMethod by a direct edge in the call graph
-
containsMethod
This method checks if a given method signature is a node in the call graph.- Parameters:
method
- the method signature of the requested node- Returns:
- it returns true if the node described by the method signature is included in the call graph, otherwise it will return false.
-
containsCall
boolean containsCall(@Nonnull MethodSignature sourceMethod, @Nonnull MethodSignature targetMethod, InvokableStmt invokableStmt) This method checks if an edge is contained in the call graph. The edge is defined by a source and target method signature which can be nodes in the call graph- Parameters:
sourceMethod
- it defines the source node in the call graphtargetMethod
- it defines the target node in the call graphinvokableStmt
- it defines the invoke stmt of the call- Returns:
- true if the edge is contained in the call graph, otherwise it will be false.
-
containsCall
This method checks if an edge is contained in the call graph. The edge is defined by a source and target method signature which can be nodes in the call graph- Parameters:
call
- it defines the requested call in the call graph- Returns:
- true if the edge is contained in the call graph, otherwise it will be false.
-
callCount
int callCount()This method counts every edge in the call graph.- Returns:
- it returns the number of all edges in the call graph.
-
exportAsDot
String exportAsDot()This method converts the call graph object into dot format and write it to a string file. -
copy
This method copies a call graph.- Returns:
- it returns a copied call graph.
-
getEntryMethods
List<MethodSignature> getEntryMethods()This method returns all entry methods of the call graph- Returns:
- a list of method signatures of entry points of the call graph
-
diff
This method compares the difference between the current call graph and call graph passed into the argument.
-