changes + annotation generation
[IRC.git] / Robust / src / Analysis / SSJava / CompositeLocation.java
index 23982187337f057d6806bf3498e30f38b8ba87f1..5308cb67ddaf4f9017dd8c95cbdd799911cc784d 100644 (file)
@@ -35,6 +35,18 @@ public class CompositeLocation implements TypeExtension {
     return locTuple.size() == 0;
   }
 
+  public boolean startsWith(CompositeLocation prefix) {
+    // tests if this composite location starts with the prefix
+
+    for (int i = 0; i < prefix.getSize(); i++) {
+      if (!prefix.get(i).equals(get(i))) {
+        return false;
+      }
+    }
+    return true;
+
+  }
+
   public String toString() {
 
     String rtr = "CompLoc[";