String loc;
Descriptor locDesc;
+ public Location(Descriptor enclosingDesc, Descriptor locDesc) {
+ this.d = enclosingDesc;
+ this.locDesc = locDesc;
+ this.loc = locDesc.getSymbol();
+ }
+
public Location(Descriptor d, String loc) {
this.d = d;
this.loc = loc;
- this.type = NORMAL;
+
+ if (loc.equals(SSJavaAnalysis.TOP)) {
+ type = TOP;
+ } else if (loc.equals(SSJavaAnalysis.BOTTOM)) {
+ type = BOTTOM;
+ } else {
+ type = NORMAL;
+ }
+
}
public Location(Descriptor d, int type) {
return true;
}
} else {
- if (loc.getLocIdentifier().equals(getLocIdentifier())) {
+ if (loc.getLocDescriptor() != null && getLocDescriptor() != null
+ && loc.getLocDescriptor().equals(getLocDescriptor())) {
+ return true;
+ } else if (loc.getLocIdentifier().equals(getLocIdentifier())) {
return true;
}
}
if (loc != null) {
hash += loc.hashCode();
}
+ if (locDesc != null) {
+ hash += locDesc.hashCode();
+ }
return hash;
}