Class CallGraphSearchUtil

java.lang.Object
com.ibm.wala.ipa.callgraph.util.CallGraphSearchUtil

public class CallGraphSearchUtil extends Object
Utility methods for searching call graphs, e.g., to find particular CGNodes or types of statements within a node
  • Method Details

    • findMainMethod

      public static CGNode findMainMethod(CallGraph cg)
      Find the main method in a call graph
      Parameters:
      cg - call graph
      Returns:
      CGNode for the main method
      Throws:
      UnimplementedError - if no main method is not found
    • findMethod

      public static CGNode findMethod(CallGraph cg, Descriptor d, Atom name)
      Find a method in a call graph
      Parameters:
      cg - the call graph
      d - descriptor for the desired method
      name - name of the desired method
      Returns:
      the corresponding CGNode. If multiple CGNodes exist for the descriptor and name, returns one of them arbitrarily
      Throws:
      UnimplementedError - if no matching CGNode is found
    • findMethod

      public static CGNode findMethod(CallGraph cg, String name)
      Find method with some name in a call graph
      Parameters:
      cg - the call graph
      name - desired method name
      Returns:
      matching CGNode
      Throws:
      UnimplementedError - if no matching CGNode is found