major revisions on FlowGraph to have more precise information
[IRC.git] / Robust / src / Analysis / SSJava / Location.java
index 1c90d577e1ce714ef9f82b4a9dfb7341cad5bfd3..c91b472fe9297b0d22fde1625f6cc1b0c86d9343 100644 (file)
@@ -14,10 +14,24 @@ public class Location implements TypeExtension {
   String loc;
   Descriptor locDesc;
 
+  public Location(Descriptor enclosingDesc, Descriptor locDescriptor) {
+    this.d = enclosingDesc;
+    this.locDesc = locDescriptor;
+    this.loc = locDescriptor.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) {