public class CallGraph2JSON extends Object
{
"<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.| Modifier and Type | Field and Description |
|---|---|
static boolean |
IGNORE_HARNESS |
| Constructor and Description |
|---|
CallGraph2JSON() |
| Modifier and Type | Method and Description |
|---|---|
static Map<String,Set<String>> |
extractEdges(com.ibm.wala.ipa.callgraph.CallGraph cg) |
static boolean |
isRealFunction(com.ibm.wala.classLoader.IMethod method) |
static String |
serialize(com.ibm.wala.ipa.callgraph.CallGraph cg) |
static void |
serializeCallSite(com.ibm.wala.cast.loader.AstMethod method,
com.ibm.wala.classLoader.CallSiteReference callsite,
Set<com.ibm.wala.classLoader.IMethod> targets,
Map<String,Set<String>> edges) |
static String |
toJSON(Map<String,Set<String>> map) |
public static String serialize(com.ibm.wala.ipa.callgraph.CallGraph cg)
public static Map<String,Set<String>> extractEdges(com.ibm.wala.ipa.callgraph.CallGraph cg)
public static void serializeCallSite(com.ibm.wala.cast.loader.AstMethod method,
com.ibm.wala.classLoader.CallSiteReference callsite,
Set<com.ibm.wala.classLoader.IMethod> targets,
Map<String,Set<String>> edges)
public static boolean isRealFunction(com.ibm.wala.classLoader.IMethod method)
Copyright © 2017. All rights reserved.