Class JSCallGraphUtil
java.lang.Object
com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil
com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil
- Direct Known Subclasses:
JSCallGraphBuilderUtil, NodejsCallGraphBuilderUtil
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic JavaScriptTranslatorFactorythe translator factory to be used for analysis TODO: pass the factory where needed instead of using a global?Fields inherited from class CAstCallGraphUtil
AVOID_DUMP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodReferencegetMethodReference(String funName) static Collection<CGNode> Get all the nodes in CG with name funName.static ModulegetPrologueFile(String name) static JavaScriptTranslatorFactoryloadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, ModuleEntry M) loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, URL url) static IClassHierarchymakeHierarchy(AnalysisScope scope, ClassLoaderFactory loaders) static IClassHierarchymakeHierarchyForScripts(String... scriptFiles) static JavaScriptLoaderFactorystatic JavaScriptLoaderFactorymakeLoaders(CAstRewriterFactory<?, ?> preprocessor) static JSAnalysisOptionsmakeOptions(AnalysisScope scope, IClassHierarchy cha, Iterable<Entrypoint> roots) static JavaScriptEntryPointsstatic voidsetTranslatorFactory(JavaScriptTranslatorFactory translatorFactory) Set up the translator factory.static StringMethods inherited from class CAstCallGraphUtil
dumpCG, getShortName, getShortName, handleFileNames, makeCache, makeScope, makeScope, makeSourceModule, makeSourceModule
-
Field Details
-
translatorFactory
the translator factory to be used for analysis TODO: pass the factory where needed instead of using a global?
-
-
Constructor Details
-
JSCallGraphUtil
public JSCallGraphUtil()
-
-
Method Details
-
setTranslatorFactory
Set up the translator factory. This method should be called before invokingmakeLoaders(). -
getTranslatorFactory
-
makeOptions
public static JSAnalysisOptions makeOptions(AnalysisScope scope, IClassHierarchy cha, Iterable<Entrypoint> roots) -
makeLoaders
- Parameters:
preprocessor- CAst rewriter to use for preprocessing JavaScript source files; may be null
-
makeLoaders
-
makeHierarchyForScripts
public static IClassHierarchy makeHierarchyForScripts(String... scriptFiles) throws ClassHierarchyException - Throws:
ClassHierarchyException
-
makeHierarchy
public static IClassHierarchy makeHierarchy(AnalysisScope scope, ClassLoaderFactory loaders) throws ClassHierarchyException - Throws:
ClassHierarchyException
-
makeScriptRoots
-
getNodes
Get all the nodes in CG with name funName. If funName is of the form"ctor:nm", return nodes corresponding to constructor function fornm. If funName is of the form"suffix:nm", return nodes corresponding to functions whose names end withnm. Otherwise, return nodes for functions whose name matches funName exactly. -
getMethodReference
-
loadAdditionalFile
public static Set<String> loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, URL url) throws IOException - Returns:
- The set of class names that where defined in the CHA as a result loading process.
- Throws:
IOException
-
loadAdditionalFile
public static Set<String> loadAdditionalFile(IClassHierarchy cha, JavaScriptLoader cl, ModuleEntry M) throws IOException - Throws:
IOException
-
simulateToStringForPropertyNames
-
getPrologueFile
-