com.ibm.wala.ipa.callgraph.impl
Class BasicCallGraph.NodeImpl

java.lang.Object
  extended by com.ibm.wala.util.graph.impl.NodeWithNumber
      extended by com.ibm.wala.ipa.callgraph.impl.BasicCallGraph.NodeImpl
All Implemented Interfaces:
CGNode, ContextItem, IClassHierarchyDweller, INodeWithNumber
Direct Known Subclasses:
ExplicitCallGraph.ExplicitNode
Enclosing class:
BasicCallGraph

public abstract class BasicCallGraph.NodeImpl
extends NodeWithNumber
implements CGNode

A class that represents the a normal node in a call graph.


Field Summary
protected  IMethod method
          The method this node represents.
 
Constructor Summary
protected BasicCallGraph.NodeImpl(IMethod method, Context C)
           
 
Method Summary
abstract  boolean addTarget(CallSiteReference reference, CGNode target)
          This is for use only by call graph builders ...
abstract  boolean equals(java.lang.Object obj)
           
 IClassHierarchy getClassHierarchy()
           
 Context getContext()
          Return the context this CGNode represents.
 IMethod getMethod()
          Return the method this CGNode represents.
abstract  int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class com.ibm.wala.util.graph.impl.NodeWithNumber
getGraphNodeId, setGraphNodeId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.wala.ipa.callgraph.CGNode
getDU, getIR, iterateCallSites, iterateNewSites
 
Methods inherited from interface com.ibm.wala.util.graph.INodeWithNumber
getGraphNodeId, setGraphNodeId
 

Field Detail

method

protected final IMethod method
The method this node represents.

Constructor Detail

BasicCallGraph.NodeImpl

protected BasicCallGraph.NodeImpl(IMethod method,
                                  Context C)
Method Detail

getMethod

public IMethod getMethod()
Description copied from interface: CGNode
Return the method this CGNode represents. This value will never be null.

Specified by:
getMethod in interface CGNode
Returns:
the target IMethod for this CGNode.

equals

public abstract boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(Object)

hashCode

public abstract int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getContext

public Context getContext()
Description copied from interface: CGNode
Return the context this CGNode represents. This value will never be null.

Specified by:
getContext in interface CGNode
Returns:
the Context for this CGNode.

addTarget

public abstract boolean addTarget(CallSiteReference reference,
                                  CGNode target)
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

getClassHierarchy

public IClassHierarchy getClassHierarchy()
Specified by:
getClassHierarchy in interface IClassHierarchyDweller