1 package Analysis.SSJava;
3 import IR.ClassDescriptor;
6 public class DeltaLocation extends CompositeLocation {
8 private Descriptor refOperand = null;
11 public DeltaLocation() {
14 // public DeltaLocation(Set<Location> set) {
15 // locTuple.addAll(set);
18 public DeltaLocation(ClassDescriptor cd, Descriptor refOperand) {
19 this.refOperand = refOperand;
22 public Descriptor getRefLocationId() {
23 return this.refOperand;
26 public void addDeltaOperand(Location op) {
27 locTuple.addElement(op);
30 public NTuple<Location> getDeltaOperandLocationVec() {
34 // public Set<Location> getBaseLocationSet() {
36 // if (operandVec.size() == 1 && (operandVec.get(0) instanceof DeltaLocation))
38 // // nested delta definition
39 // DeltaLocation deltaLoc = (DeltaLocation) operandVec.get(0);
40 // return deltaLoc.getBaseLocationSet();
42 // Set<Location> set = new HashSet<Location>();
43 // set.addAll(operandVec);
49 public boolean equals(Object o) {
51 if (!(o instanceof DeltaLocation)) {
55 DeltaLocation deltaLoc = (DeltaLocation) o;
57 if (deltaLoc.getDeltaOperandLocationVec().equals(getDeltaOperandLocationVec())) {
63 public int hashCode() {
64 int hash = locTuple.hashCode();
65 if (refOperand != null) {
66 hash += refOperand.hashCode();
71 public String toString() {
72 String rtr = "delta(";
74 if (locTuple.size() != 0) {
75 int tupleSize = locTuple.size();
76 for (int i = 0; i < tupleSize; i++) {
77 Location locElement = locTuple.get(i);