this.aspectType = aspectType;
}
+ // An EclipseTypeMunger and a BcelTypeMunger may say TRUE for equivalentTo()...
+ public boolean equivalentTo(Object other) {
+ if (! (other instanceof ConcreteTypeMunger)) return false;
+ ConcreteTypeMunger o = (ConcreteTypeMunger) other;
+ return ((o.getMunger() == null) ? (getMunger() == null) : o.getMunger().equals(getMunger()))
+ && ((o.getAspectType() == null) ? (getAspectType() == null) : o.getAspectType().equals(getAspectType()));
+ }
+
//public abstract boolean munge(LazyClassGen gen);
otherTypeMungers.addAll(other.typeMungers);
}
+ // initial go at equivalence logic rather than set compare (see pr133532)
+// if (theseTypeMungers.size()!=otherTypeMungers.size()) {
+// changed = true;
+// typeMungers = other.typeMungers;
+// } else {
+// boolean foundInequality=false;
+// for (Iterator iter = theseTypeMungers.iterator(); iter.hasNext() && !foundInequality;) {
+// Object thisOne = (Object) iter.next();
+// boolean foundInOtherSet = false;
+// for (Iterator iterator = otherTypeMungers.iterator(); iterator.hasNext();) {
+// Object otherOne = (Object) iterator.next();
+// if (thisOne instanceof ConcreteTypeMunger && otherOne instanceof ConcreteTypeMunger) {
+// if (((ConcreteTypeMunger)thisOne).equivalentTo(otherOne)) {
+// foundInOtherSet=true;
+// } else if (thisOne.equals(otherOne)) {
+// foundInOtherSet=true;
+// }
+// } else {
+// if (thisOne.equals(otherOne)) {
+// foundInOtherSet=true;
+// }
+// }
+// }
+// if (!foundInOtherSet) foundInequality=true;
+// }
+// if (foundInequality) {
+// changed = true;
+// typeMungers = other.typeMungers;
+//// } else {
+//// typeMungers = other.typeMungers;
+// }
+// }
if (!theseTypeMungers.equals(otherTypeMungers)) {
changed = true;
typeMungers = other.typeMungers;