Class DefaultCallGraph

java.lang.Object
pascal.taie.analysis.graph.callgraph.AbstractCallGraph<Invoke,JMethod>
pascal.taie.analysis.graph.callgraph.DefaultCallGraph
All Implemented Interfaces:
Serializable, Iterable<JMethod>, CallGraph<Invoke,JMethod>, StmtResult<Set<JMethod>>, Graph<JMethod>

public class DefaultCallGraph extends AbstractCallGraph<Invoke,JMethod>
Default implementation of call graph.
See Also:
  • Constructor Details

    • DefaultCallGraph

      public DefaultCallGraph()
  • Method Details

    • addEntryMethod

      public void addEntryMethod(JMethod entryMethod)
      Adds an entry method to this call graph.
    • addReachableMethod

      public boolean addReachableMethod(JMethod method)
      Adds a reachable method to this call graph.
      Returns:
      true if this call graph changed as a result of the call, otherwise false.
    • addEdge

      public boolean addEdge(Edge<Invoke,JMethod> edge)
      Adds a new call graph edge to this call graph.
      Parameters:
      edge - the call edge to be added
      Returns:
      true if the call graph changed as a result of the call, otherwise false.
    • getContainerOf

      public JMethod getContainerOf(Invoke invoke)
      Specified by:
      getContainerOf in interface CallGraph<Invoke,JMethod>
      Overrides:
      getContainerOf in class AbstractCallGraph<Invoke,JMethod>
      Returns:
      the method that contains the given call site.
    • isRelevant

      public boolean isRelevant(Stmt stmt)
      Returns:
      if stmt is relevant in this result.
    • getResult

      public Set<JMethod> getResult(Stmt stmt)
      Returns:
      analysis result of given stmt.