Added public access method for the callee->callerSet mapping
authorjjenista <jjenista>
Thu, 21 Feb 2008 23:58:57 +0000 (23:58 +0000)
committerjjenista <jjenista>
Thu, 21 Feb 2008 23:58:57 +0000 (23:58 +0000)
Robust/src/Analysis/CallGraph/CallGraph.java

index 772e81570f27a8890246366413a06a96512826ef..b3e68e123191a7c319ad1b163bf78dfb3d02780a 100644 (file)
@@ -32,6 +32,22 @@ public class CallGraph {
        buildVirtualMap();
        buildGraph();
     }
+
+    // this method returns the set of Descriptors 
+    // (MethodDescriptors and/or TaskDescriptors)
+    //  that call the given method
+    public Set getCallerSet( MethodDescriptor md ) {
+       return (Set) mapCallee2CallerSet.get( md );
+    }
+
+    // this method returns the set of MethodDescriptors that
+    // are called by the given method or task
+    public Set getCalleeSet( Descriptor d ) {
+       assert (d instanceof MethodDescriptor) ||
+              (d instanceof   TaskDescriptor);
+
+       return (Set) mapCaller2CalleeSet.get( d );
+    }
     
     // build a mapping of virtual methods to all
     // possible implementations of that method