changes.
[IRC.git] / Robust / src / Analysis / SSJava / MethodLocationInfo.java
1 package Analysis.SSJava;
2
3 import java.util.HashMap;
4 import java.util.HashSet;
5 import java.util.Map;
6 import java.util.Set;
7
8 import IR.Descriptor;
9 import IR.MethodDescriptor;
10
11 public class MethodLocationInfo extends LocationInfo {
12
13   String returnLocName;
14   String thisLocName;
15   CompositeLocation pcLoc;
16   String globalLocName;
17
18   Map<Integer, CompositeLocation> mapParamIdxToInferLoc;
19   Set<String> paramLocNameSet;
20
21   public MethodLocationInfo(MethodDescriptor md) {
22     this.md = md;
23     this.paramLocNameSet = new HashSet<String>();
24     this.pcLoc = new CompositeLocation(new Location(md, Location.TOP));
25     this.mapParamIdxToInferLoc = new HashMap<Integer, CompositeLocation>();
26   }
27
28   public void addMapParamIdxToInferLoc(int paramIdx, CompositeLocation inferLoc) {
29     mapParamIdxToInferLoc.put(paramIdx, inferLoc);
30   }
31
32   public Map<Integer, CompositeLocation> getMapParamIdxToInferLoc() {
33     return mapParamIdxToInferLoc;
34   }
35
36   public String getGlobalLocName() {
37     return globalLocName;
38   }
39
40   public void setGlobalLocName(String globalLocName) {
41     this.globalLocName = globalLocName;
42   }
43
44   public String getReturnLocName() {
45     return returnLocName;
46   }
47
48   public void setReturnLocName(String returnLocName) {
49     this.returnLocName = returnLocName;
50   }
51
52   public String getThisLocName() {
53     return thisLocName;
54   }
55
56   public void setThisLocName(String thisLocName) {
57     this.thisLocName = thisLocName;
58   }
59
60   public CompositeLocation getPCLoc() {
61     return pcLoc;
62   }
63
64   public void setPCLoc(CompositeLocation pcLoc) {
65     this.pcLoc = pcLoc;
66   }
67
68   public void removeMaplocalVarToLocSet(Descriptor localVarDesc) {
69     String localVarLocSymbol = localVarDesc.getSymbol();
70     getDescSet(localVarLocSymbol).remove(localVarDesc);
71   }
72
73 }