From b68bba932a8077cefa97d02fa730d4edb30c483f Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 21 Feb 2008 23:58:57 +0000 Subject: [PATCH] Added public access method for the callee->callerSet mapping --- Robust/src/Analysis/CallGraph/CallGraph.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Robust/src/Analysis/CallGraph/CallGraph.java b/Robust/src/Analysis/CallGraph/CallGraph.java index 772e8157..b3e68e12 100644 --- a/Robust/src/Analysis/CallGraph/CallGraph.java +++ b/Robust/src/Analysis/CallGraph/CallGraph.java @@ -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 -- 2.34.1