1 package Analysis.SSJava;
3 import java.util.HashMap;
4 import java.util.HashSet;
9 import IR.MethodDescriptor;
11 public class MethodLocationInfo extends LocationInfo {
14 CompositeLocation pcLoc;
15 CompositeLocation returnLoc;
17 public CompositeLocation getReturnLoc() {
21 public void setReturnLoc(CompositeLocation returnLoc) {
22 this.returnLoc = returnLoc;
27 Map<Integer, CompositeLocation> mapParamIdxToInferLoc;
28 Set<String> paramLocNameSet;
30 public MethodLocationInfo(MethodDescriptor md) {
32 this.paramLocNameSet = new HashSet<String>();
33 this.pcLoc = new CompositeLocation(new Location(md, Location.TOP));
34 this.mapParamIdxToInferLoc = new HashMap<Integer, CompositeLocation>();
37 public void addMapParamIdxToInferLoc(int paramIdx, CompositeLocation inferLoc) {
38 mapParamIdxToInferLoc.put(paramIdx, inferLoc);
41 public int getNumParam() {
42 return mapParamIdxToInferLoc.keySet().size();
45 public CompositeLocation getParamCompositeLocation(int idx) {
46 return mapParamIdxToInferLoc.get(idx);
49 public Map<Integer, CompositeLocation> getMapParamIdxToInferLoc() {
50 return mapParamIdxToInferLoc;
53 public String getGlobalLocName() {
57 public void setGlobalLocName(String globalLocName) {
58 this.globalLocName = globalLocName;
61 public String getThisLocName() {
65 public void setThisLocName(String thisLocName) {
66 this.thisLocName = thisLocName;
69 public CompositeLocation getPCLoc() {
73 public void setPCLoc(CompositeLocation pcLoc) {
77 public void removeMaplocalVarToLocSet(Descriptor localVarDesc) {
78 String localVarLocSymbol = localVarDesc.getSymbol();
79 getDescSet(localVarLocSymbol).remove(localVarDesc);
82 public MethodDescriptor getMethodDesc() {