import java.util.HashMap;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Map;
import java.util.Set;
this.cd = cd;
}
+ public Descriptor getDescIdentifier() {
+ if (md != null) {
+ return md;
+ }
+ {
+ return cd;
+ }
+ }
+
public Map<String, Set<Descriptor>> getMapLocSymbolToDescSet() {
return mapLocSymbolToDescSet;
}
}
mapLocSymbolToRelatedInferLocSet.get(locSymbol).add(
new Pair<Descriptor, Descriptor>(enclosingDesc, desc));
+
+ addMapLocSymbolToDescSet(locSymbol, desc);
}
public Set<Pair<Descriptor, Descriptor>> getRelatedInferLocSet(String locSymbol) {
+
+ if (!mapLocSymbolToRelatedInferLocSet.containsKey(locSymbol)) {
+ mapLocSymbolToRelatedInferLocSet.put(locSymbol, new HashSet<Pair<Descriptor, Descriptor>>());
+ }
return mapLocSymbolToRelatedInferLocSet.get(locSymbol);
}
newInferLoc.addLocation(loc);
mapDescToInferCompositeLocation.put(desc, newInferLoc);
- addMapLocSymbolToDescSet(desc.getSymbol(), desc);
+ // addMapLocSymbolToDescSet(desc.getSymbol(), desc);
addMapLocSymbolToRelatedInferLoc(desc.getSymbol(), enclosingDesc, desc);
}
return mapDescToInferCompositeLocation.get(desc);
public void removeRelatedInferLocSet(String oldLocSymbol, String newSharedLoc) {
Set<Descriptor> descSet = getDescSet(oldLocSymbol);
getDescSet(newSharedLoc).addAll(descSet);
+ // getRelatedInferLocSet(newSharedLoc).addAll(getRelatedInferLocSet(oldLocSymbol));
mapLocSymbolToDescSet.remove(oldLocSymbol);
mapLocSymbolToRelatedInferLocSet.remove(oldLocSymbol);
}