- } else if (ad.getType() == AnnotationDescriptor.SINGLE_ANNOTATION) {
- if (ad.getMarker().equals(SSJavaAnalysis.DELTA)) {
+ if (ad.getMarker().equals(SSJavaAnalysis.LOC)) {
+ String locationID = ad.getValue();
+ // check if location is defined
+ Lattice<String> lattice = (Lattice<String>) state.getCd2LocationOrder().get(cd);
+ if (lattice == null || (!lattice.containsKey(locationID))) {
+ throw new Error("Location " + locationID
+ + " is not defined in the location hierarchy of class " + cd.getSymbol() + ".");
+ }
+ Location loc = new Location(cd, locationID);
+ td2loc.put(vd, loc);
+ addTypeLocation(vd.getType(), loc);
+
+ } else if (ad.getMarker().equals(SSJavaAnalysis.DELTA)) {