Class CallGraph2JSON

java.lang.Object
com.ibm.wala.cast.js.util.CallGraph2JSON

public class CallGraph2JSON extends Object
Utility class to serialize call graphs as JSON objects.

The serialised objects have the form

 {
   "<callsite1>": [ "<callee1>", "<callee2>", ... ],
   "<callsite2>": ...
 }
 
where both call sites and callees are encoded as strings of the form
 "<filename>@<lineno>:<beginoff>-<endoff>"
 
Here, filename is the name of the containing JavaScript file (not including its directory), and lineno, beginoff and endoff encode the source position of the call expression (for call sites) or the function declaration/expression (for callees) inside the file in terms of its starting line, its starting offset (in characters from the beginning of the file), and its end offset.
Author:
mschaefer
  • Constructor Details

    • CallGraph2JSON

      public CallGraph2JSON()
    • CallGraph2JSON

      public CallGraph2JSON(boolean ignoreHarness)
    • CallGraph2JSON

      public CallGraph2JSON(boolean ignoreHarness, boolean exposeContexts)
  • Method Details