Package com.google.javascript.jscomp
Class CallGraph.Callsite
java.lang.Object
com.google.javascript.jscomp.CallGraph.Callsite
- Enclosing class:
- CallGraph
An inner class that represents call sites in the call graph.
A Callsite knows how to get its AST node, what its containing
Function is, and what its target Functions are.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the possible target functions that this callsite could call.boolean
If true, then this callsite could target a function defined in the externs.boolean
If true, then DefinitionProvider used in callgraph construction was unable find all target functions of this callsite.
-
Method Details
-
getAstNode
-
getContainingFunction
-
getPossibleTargets
Returns the possible target functions that this callsite could call. These targets do not include functions defined in externs. If this callsite could call an extern function, then hasExternTarget() will return true. getKnownTargets() is a best effort only: the collection may include other functions that are not actual targets and (if hasUnknownTargets() is true) may be missing actual targets. This method should not be called on a Callsite from a CallGraph that was constructed withcomputeForwardGraph
false
. -
hasUnknownTarget
public boolean hasUnknownTarget()If true, then DefinitionProvider used in callgraph construction was unable find all target functions of this callsite. If false, then getKnownTargets() contains all the possible targets of this callsite (and, perhaps, additional targets as well). -
hasExternTarget
public boolean hasExternTarget()If true, then this callsite could target a function defined in the externs. If false, then not.
-