Package com.google.javascript.jscomp
Class CallGraph.Callsite
- java.lang.Object
-
- com.google.javascript.jscomp.CallGraph.Callsite
-
- Enclosing class:
- CallGraph
public class CallGraph.Callsite extends java.lang.Object
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
getAstNode()
CallGraph.Function
getContainingFunction()
java.util.Collection<CallGraph.Function>
getPossibleTargets()
Returns the possible target functions that this callsite could call.boolean
hasExternTarget()
If true, then this callsite could target a function defined in the externs.boolean
hasUnknownTarget()
If true, then DefinitionProvider used in callgraph construction was unable find all target functions of this callsite.
-
-
-
Method Detail
-
getAstNode
public Node getAstNode()
-
getContainingFunction
public CallGraph.Function getContainingFunction()
-
getPossibleTargets
public java.util.Collection<CallGraph.Function> 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.
-
-