changes.
[IRC.git] / Robust / src / Analysis / SSJava / MethodSummary.java
index 63f4b99e81247c4e51aa02c38ee062a584f43650..d2f7916e0cae6602938c3ed751610fd5b9135453 100644 (file)
@@ -17,15 +17,35 @@ public class MethodSummary extends LocationSummary {
   CompositeLocation returnLoc;
 
   Map<Integer, CompositeLocation> mapParamIdxToInferLoc;
-  Map<Descriptor, CompositeLocation> mapDescToInferCompositeLocation;
+  Map<Descriptor, CompositeLocation> mapVarDescToInferCompositeLocation;
 
   public MethodSummary(MethodDescriptor md) {
     this.md = md;
     this.pcLoc = new CompositeLocation(new Location(md, Location.TOP));
     this.mapParamIdxToInferLoc = new HashMap<Integer, CompositeLocation>();
+    this.mapVarDescToInferCompositeLocation = new HashMap<Descriptor, CompositeLocation>();
     this.thisLocName = "this";
   }
 
+  public Map<Descriptor, CompositeLocation> getMapVarDescToInferCompositeLocation() {
+    return mapVarDescToInferCompositeLocation;
+  }
+
+  public void addMapVarNameToInferCompLoc(Descriptor varDesc, CompositeLocation inferLoc) {
+    mapVarDescToInferCompositeLocation.put(varDesc, inferLoc);
+  }
+
+  public CompositeLocation getInferLocation(Descriptor varDesc) {
+    return mapVarDescToInferCompositeLocation.get(varDesc);
+    // if (mapVarNameToInferCompositeLocation.containsKey(varName)) {
+    // // it already has a composite location assignment.
+    // return mapVarNameToInferCompositeLocation.get(varName);
+    // } else {
+    // String locName = getLocationName(varName);
+    // return new CompositeLocation(new Location(md, locName));
+    // }
+  }
+
   public void addMapParamIdxToInferLoc(int paramIdx, CompositeLocation inferLoc) {
     mapParamIdxToInferLoc.put(paramIdx, inferLoc);
   }
@@ -38,4 +58,16 @@ public class MethodSummary extends LocationSummary {
     this.pcLoc = pcLoc;
   }
 
+  public CompositeLocation getPCLoc() {
+    return pcLoc;
+  }
+
+  public void setRETURNLoc(CompositeLocation returnLoc) {
+    this.returnLoc = returnLoc;
+  }
+
+  public CompositeLocation getRETURNLoc() {
+    return returnLoc;
+  }
+
 }