Class JSCallGraphBuilderUtil
java.lang.Object
com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil
com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil
com.ibm.wala.cast.js.util.JSCallGraphBuilderUtil
TODO this class is a mess. rewrite.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class JSCallGraphUtil
JSCallGraphUtil.Bootstrap -
Field Summary
Fields inherited from class JSCallGraphUtil
translatorFactoryFields inherited from class CAstCallGraphUtil
AVOID_DUMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLgetURLforFile(String dir, String name, ClassLoader loader) protected static JSCFABuildermakeCG(JavaScriptLoaderFactory loaders, AnalysisScope scope, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) static JSCFABuildermakeCGBuilder(JavaScriptLoaderFactory loaders, Module[] scripts, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) static CallGraphmakeHTMLCG(URL url) static CallGraphmakeHTMLCG(URL url, JSCallGraphBuilderUtil.CGBuilderType zeroOneCfaNoCallApply) static CallGraphmakeHTMLCG(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor) static CallGraphmakeHTMLCG(URL url, Supplier<JSSourceExtractor> fExtractor) static JSCFABuildermakeHTMLCGBuilder(URL url) static JSCFABuildermakeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType type, Reader r) static JSCFABuildermakeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor) static JSCFABuildermakeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor, Reader r) static JSCFABuildermakeHTMLCGBuilder(URL url, Supplier<JSSourceExtractor> fExtractor) static JSCFABuildermakeHTMLCGBuilder(URL url, Supplier<JSSourceExtractor> fExtractor, Reader r) static SourceModule[]makeHtmlScope(URL url, JavaScriptLoaderFactory loaders, Supplier<JSSourceExtractor> fExtractor) static SourceModule[]makeHtmlScope(URL url, JavaScriptLoaderFactory loaders, Supplier<JSSourceExtractor> fExtractor, Reader r) static CallGraphmakeScriptCG(SourceModule[] scripts, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) static CallGraphmakeScriptCG(String dir, String name) static CallGraphmakeScriptCG(String dir, String name, JSCallGraphBuilderUtil.CGBuilderType builderType, ClassLoader loader) static CallGraphmakeScriptCG(String dir, String name, ClassLoader loader) static JSCFABuildermakeScriptCGBuilder(String dir, String name) static JSCFABuildermakeScriptCGBuilder(String dir, String name, JSCallGraphBuilderUtil.CGBuilderType builderType, ClassLoader loader) create a CG builder for script.static JSCFABuildermakeScriptCGBuilder(String dir, String name, ClassLoader loader) static JSCFABuilderstatic JSCFABuildermakeScriptCGBuilderWithoutCorrelationTracking(String dir, String name, ClassLoader loader) static AnalysisScopemakeScriptScope(String dir, String name, JavaScriptLoaderFactory loaders) static AnalysisScopemakeScriptScope(String dir, String name, JavaScriptLoaderFactory loaders, ClassLoader loader) static Module[]makeSourceModules(String dir, String name) static Module[]makeSourceModules(String dir, String name, ClassLoader loader) Methods inherited from class JSCallGraphUtil
getMethodReference, getNodes, getPrologueFile, getTranslatorFactory, loadAdditionalFile, loadAdditionalFile, makeHierarchy, makeHierarchyForScripts, makeLoaders, makeLoaders, makeOptions, makeScriptRoots, setTranslatorFactory, simulateToStringForPropertyNamesMethods inherited from class CAstCallGraphUtil
dumpCG, getShortName, getShortName, handleFileNames, makeCache, makeScope, makeScope, makeSourceModule, makeSourceModule
-
Constructor Details
-
JSCallGraphBuilderUtil
public JSCallGraphBuilderUtil()
-
-
Method Details
-
makeScriptCGBuilder
public static JSCFABuilder makeScriptCGBuilder(String dir, String name, JSCallGraphBuilderUtil.CGBuilderType builderType, ClassLoader loader) throws IOException, WalaException create a CG builder for script. Note that the script at dir/name is loaded via the classloader, not from the filesystem.- Throws:
IOExceptionWalaException
-
getURLforFile
- Throws:
IOException
-
makeScriptScope
public static AnalysisScope makeScriptScope(String dir, String name, JavaScriptLoaderFactory loaders, ClassLoader loader) throws IOException - Throws:
IOException
-
makeScriptScope
public static AnalysisScope makeScriptScope(String dir, String name, JavaScriptLoaderFactory loaders) throws IOException - Throws:
IOException
-
makeSourceModules
- Throws:
IOException
-
makeSourceModules
public static Module[] makeSourceModules(String dir, String name, ClassLoader loader) throws IOException - Throws:
IOException
-
makeScriptCGBuilder
public static JSCFABuilder makeScriptCGBuilder(String dir, String name, ClassLoader loader) throws IOException, WalaException - Throws:
IOExceptionWalaException
-
makeScriptCGBuilder
public static JSCFABuilder makeScriptCGBuilder(String dir, String name) throws IOException, WalaException - Throws:
IOExceptionWalaException
-
makeScriptCG
public static CallGraph makeScriptCG(String dir, String name) throws IOException, IllegalArgumentException, CancelException, WalaException -
makeScriptCG
public static CallGraph makeScriptCG(String dir, String name, ClassLoader loader) throws IOException, IllegalArgumentException, CancelException, WalaException -
makeScriptCGBuilderWithoutCorrelationTracking
public static JSCFABuilder makeScriptCGBuilderWithoutCorrelationTracking(String dir, String name, ClassLoader loader) throws IOException, WalaException - Throws:
IOExceptionWalaException
-
makeScriptCGBuilderWithoutCorrelationTracking
public static JSCFABuilder makeScriptCGBuilderWithoutCorrelationTracking(String dir, String name) throws IOException, WalaException - Throws:
IOExceptionWalaException
-
makeScriptCG
public static CallGraph makeScriptCG(String dir, String name, JSCallGraphBuilderUtil.CGBuilderType builderType, ClassLoader loader) throws IOException, IllegalArgumentException, CancelException, WalaException -
makeScriptCG
public static CallGraph makeScriptCG(SourceModule[] scripts, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) throws IllegalArgumentException, CancelException, WalaException -
makeHTMLCGBuilder
public static JSCFABuilder makeHTMLCGBuilder(URL url, Supplier<JSSourceExtractor> fExtractor) throws WalaException - Throws:
WalaException
-
makeHTMLCGBuilder
public static JSCFABuilder makeHTMLCGBuilder(URL url, Supplier<JSSourceExtractor> fExtractor, Reader r) throws WalaException - Throws:
WalaException
-
makeHTMLCGBuilder
public static JSCFABuilder makeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor) throws WalaException - Throws:
WalaException
-
makeHTMLCGBuilder
public static JSCFABuilder makeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor, Reader r) throws WalaException - Throws:
WalaException
-
makeHtmlScope
public static SourceModule[] makeHtmlScope(URL url, JavaScriptLoaderFactory loaders, Supplier<JSSourceExtractor> fExtractor) -
makeHtmlScope
public static SourceModule[] makeHtmlScope(URL url, JavaScriptLoaderFactory loaders, Supplier<JSSourceExtractor> fExtractor, Reader r) -
makeHTMLCG
public static CallGraph makeHTMLCG(URL url, Supplier<JSSourceExtractor> fExtractor) throws IllegalArgumentException, CancelException, WalaException -
makeHTMLCG
public static CallGraph makeHTMLCG(URL url, JSCallGraphBuilderUtil.CGBuilderType builderType, Supplier<JSSourceExtractor> fExtractor) throws IllegalArgumentException, CancelException, WalaException -
makeCGBuilder
public static JSCFABuilder makeCGBuilder(JavaScriptLoaderFactory loaders, Module[] scripts, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) throws WalaException - Throws:
WalaException
-
makeCG
protected static JSCFABuilder makeCG(JavaScriptLoaderFactory loaders, AnalysisScope scope, JSCallGraphBuilderUtil.CGBuilderType builderType, IRFactory<IMethod> irFactory) throws WalaException - Throws:
WalaException
-
makeHTMLCG
public static CallGraph makeHTMLCG(URL url, JSCallGraphBuilderUtil.CGBuilderType zeroOneCfaNoCallApply) throws IllegalArgumentException, CancelException, WalaException -
makeHTMLCG
public static CallGraph makeHTMLCG(URL url) throws IllegalArgumentException, CancelException, WalaException -
makeHTMLCGBuilder
public static JSCFABuilder makeHTMLCGBuilder(URL url, JSCallGraphBuilderUtil.CGBuilderType type, Reader r) throws WalaException - Throws:
WalaException
-
makeHTMLCGBuilder
- Throws:
WalaException
-