1 package Analysis.SSJava;
3 import IR.ClassDescriptor;
5 public class Location {
7 public static final int TOP = 1;
8 public static final int NORMAL = 2;
9 public static final int BOTTOM = 3;
12 private ClassDescriptor cd;
15 public Location(ClassDescriptor cd, String loc) {
21 public Location(ClassDescriptor cd) {
25 public void setType(int type) {
29 public ClassDescriptor getClassDescriptor() {
33 public String getLocIdentifier() {
37 public int getType() {
41 public boolean equals(Object o) {
42 if (!(o instanceof Location)) {
46 Location loc = (Location) o;
48 if (loc.getClassDescriptor().equals(getClassDescriptor())) {
49 if (loc.getLocIdentifier() == null || getLocIdentifier() == null) {
50 if (loc.getType() == getType()) {
54 if (loc.getLocIdentifier().equals(getLocIdentifier())) {
63 public int hashCode() {
65 int hash = cd.hashCode();
67 hash += loc.hashCode();