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;
16 CompositeLocation returnLoc;
18 public CompositeLocation getReturnLoc() {
22 public void setReturnLoc(CompositeLocation returnLoc) {
23 this.returnLoc = returnLoc;
28 Map<Integer, CompositeLocation> mapParamIdxToInferLoc;
29 Set<String> paramLocNameSet;
31 public MethodLocationInfo(MethodDescriptor md) {
33 this.paramLocNameSet = new HashSet<String>();
34 this.pcLoc = new CompositeLocation(new Location(md, Location.TOP));
35 this.mapParamIdxToInferLoc = new HashMap<Integer, CompositeLocation>();
38 public void addMapParamIdxToInferLoc(int paramIdx, CompositeLocation inferLoc) {
39 mapParamIdxToInferLoc.put(paramIdx, inferLoc);
42 public int getNumParam() {
43 return mapParamIdxToInferLoc.keySet().size();
46 public CompositeLocation getParamCompositeLocation(int idx) {
47 return mapParamIdxToInferLoc.get(idx);
50 public Map<Integer, CompositeLocation> getMapParamIdxToInferLoc() {
51 return mapParamIdxToInferLoc;
54 public String getGlobalLocName() {
58 public void setGlobalLocName(String globalLocName) {
59 this.globalLocName = globalLocName;
62 public String getReturnLocName() {
66 public void setReturnLocName(String returnLocName) {
67 this.returnLocName = returnLocName;
70 public String getThisLocName() {
74 public void setThisLocName(String thisLocName) {
75 this.thisLocName = thisLocName;
78 public CompositeLocation getPCLoc() {
82 public void setPCLoc(CompositeLocation pcLoc) {
86 public void removeMaplocalVarToLocSet(Descriptor localVarDesc) {
87 String localVarLocSymbol = localVarDesc.getSymbol();
88 getDescSet(localVarLocSymbol).remove(localVarDesc);
91 public MethodDescriptor getMethodDesc() {