1 package Analysis.SSJava;
3 import java.util.HashMap;
4 import java.util.HashSet;
9 import IR.MethodDescriptor;
11 public class MethodLocationInfo extends LocationInfo {
15 CompositeLocation pcLoc;
18 Map<Integer, CompositeLocation> mapParamIdxToInferLoc;
19 Set<String> paramLocNameSet;
21 public MethodLocationInfo(MethodDescriptor md) {
23 this.paramLocNameSet = new HashSet<String>();
24 this.pcLoc = new CompositeLocation(new Location(md, Location.TOP));
25 this.mapParamIdxToInferLoc = new HashMap<Integer, CompositeLocation>();
28 public void addMapParamIdxToInferLoc(int paramIdx, CompositeLocation inferLoc) {
29 mapParamIdxToInferLoc.put(paramIdx, inferLoc);
32 public int getNumParam() {
33 return mapParamIdxToInferLoc.keySet().size();
36 public CompositeLocation getParamCompositeLocation(int idx) {
37 return mapParamIdxToInferLoc.get(idx);
40 public Map<Integer, CompositeLocation> getMapParamIdxToInferLoc() {
41 return mapParamIdxToInferLoc;
44 public String getGlobalLocName() {
48 public void setGlobalLocName(String globalLocName) {
49 this.globalLocName = globalLocName;
52 public String getReturnLocName() {
56 public void setReturnLocName(String returnLocName) {
57 this.returnLocName = returnLocName;
60 public String getThisLocName() {
64 public void setThisLocName(String thisLocName) {
65 this.thisLocName = thisLocName;
68 public CompositeLocation getPCLoc() {
72 public void setPCLoc(CompositeLocation pcLoc) {
76 public void removeMaplocalVarToLocSet(Descriptor localVarDesc) {
77 String localVarLocSymbol = localVarDesc.getSymbol();
78 getDescSet(localVarLocSymbol).remove(localVarDesc);
81 public MethodDescriptor getMethodDesc() {