Interface CallGraph
-
- All Known Implementing Classes:
BaseCallGraph
public interface CallGraphA callgraph of the program to analyze, that knows how to resolve dynamic targets ofUnresolvedCalls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<CodeMember>getCallees(CodeMember cm)Yields all theCodeMembers that are called by the given one.java.util.Collection<CodeMember>getCallers(CodeMember cm)Yields all theCodeMembers that call the given one.java.util.Collection<Call>getCallSites(CodeMember cm)Yields all theCalls that targets the givenCodeMember.voidinit(Application app)Initializes the call graph of the given program.voidregisterCall(CFGCall call)Callresolve(UnresolvedCall call, java.util.Set<Type>[] types, SymbolAliasing aliasing)Yields aCallimplementation that corresponds to the resolution of the givenUnresolvedCall.
-
-
-
Method Detail
-
init
void init(Application app) throws CallGraphConstructionException
Initializes the call graph of the given program.- Parameters:
app- the application to analyze- Throws:
CallGraphConstructionException- if an exception happens while building the call graph
-
resolve
Call resolve(UnresolvedCall call, java.util.Set<Type>[] types, SymbolAliasing aliasing) throws CallResolutionException
Yields aCallimplementation that corresponds to the resolution of the givenUnresolvedCall.- Parameters:
call- the call to resolvetypes- the runtime types of the parameters of the callaliasing- the symbol aliasing information- Returns:
- a collection of all the possible runtime targets
- Throws:
CallResolutionException- if this call graph is unable to resolve the given call
-
registerCall
void registerCall(CFGCall call)
- Parameters:
call- the call to register
-
getCallers
java.util.Collection<CodeMember> getCallers(CodeMember cm)
Yields all theCodeMembers that call the given one. The returned collection might contain partial results if this call graph is not fully built.- Parameters:
cm- the target code member- Returns:
- the collection of callers code members
-
getCallees
java.util.Collection<CodeMember> getCallees(CodeMember cm)
Yields all theCodeMembers that are called by the given one. The returned collection might contain partial results if this call graph is not fully built.- Parameters:
cm- the target code member- Returns:
- the collection of called code members
-
getCallSites
java.util.Collection<Call> getCallSites(CodeMember cm)
Yields all theCalls that targets the givenCodeMember. The returned collection might contain partial results if this call graph is not fully built.- Parameters:
cm- the target code member- Returns:
- the collection of calls that target the code member
-
-