com.ibm.wala.ipa.callgraph.impl
Class ExplicitCallGraph.ExplicitNode
java.lang.Object
com.ibm.wala.util.graph.impl.NodeWithNumber
com.ibm.wala.ipa.callgraph.impl.BasicCallGraph.NodeImpl
com.ibm.wala.ipa.callgraph.impl.ExplicitCallGraph.ExplicitNode
- All Implemented Interfaces:
- CGNode, ContextItem, IClassHierarchyDweller, INodeWithNumber
- Direct Known Subclasses:
- AstCallGraph.AstCGNode, DelegatingExplicitCallGraph.DelegatingCGNode
- Enclosing class:
- ExplicitCallGraph
public class ExplicitCallGraph.ExplicitNode
- extends BasicCallGraph.NodeImpl
|
Field Summary |
protected SparseVector<java.lang.Object> |
targets
A Mapping from call site program counter (int) -> Object, where Object is a CGNode if we've discovered exactly one target for
the site, or an IntSet of node numbers if we've discovered more than one target for the site. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
targets
protected final SparseVector<java.lang.Object> targets
- A Mapping from call site program counter (int) -> Object, where Object is a CGNode if we've discovered exactly one target for
the site, or an IntSet of node numbers if we've discovered more than one target for the site.
ExplicitCallGraph.ExplicitNode
protected ExplicitCallGraph.ExplicitNode(IMethod method,
Context C)
- Parameters:
method -
getPossibleTargets
protected java.util.Set<CGNode> getPossibleTargets(CallSiteReference site)
getPossibleTargetNumbers
protected IntSet getPossibleTargetNumbers(CallSiteReference site)
getPossibleSites
protected java.util.Iterator<CallSiteReference> getPossibleSites(CGNode to)
getNumberOfTargets
protected int getNumberOfTargets(CallSiteReference site)
addTarget
public boolean addTarget(CallSiteReference site,
CGNode tNode)
- Description copied from interface:
CGNode
- This is for use only by call graph builders ... not by the general
public. Clients should not use this.
Record that a particular call site might resolve to a call to a
particular target node. Returns true if this is a new target
- Specified by:
addTarget in interface CGNode- Specified by:
addTarget in class BasicCallGraph.NodeImpl
addTarget
protected boolean addTarget(int pc,
CGNode tNode)
removeTarget
public void removeTarget(CGNode target)
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals in class BasicCallGraph.NodeImpl
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
- Specified by:
hashCode in class BasicCallGraph.NodeImpl
- See Also:
Object.hashCode()
getAllTargetNumbers
protected MutableSharedBitVectorIntSet getAllTargetNumbers()
clearAllTargets
public void clearAllTargets()
getIR
public IR getIR()
- Returns:
- the "default" IR for this node used by the governing call graph
getDU
public DefUse getDU()
- Returns:
- DefUse for the "default" IR for this node used by the governing call graph
getCallGraph
public ExplicitCallGraph getCallGraph()
iterateCallSites
public java.util.Iterator<CallSiteReference> iterateCallSites()
- Returns:
- an Iterator of the call statements that may execute
in a given method for a given context
iterateNewSites
public java.util.Iterator<NewSiteReference> iterateNewSites()
- Returns:
- an Iterator of the types that may be allocated by a given
method in a given context.
getCFG
public ControlFlowGraph<SSAInstruction,ISSABasicBlock> getCFG()