EqualVisitor { (@ boolean equal = true; Vector history = new Vector(); void SetSecond(Object second) { this.history = new Vector(); this.equal = true; this.history.addElement(second); } boolean IsEqual() { return this.equal; } @) before EqualVisitor (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } } @) before Main (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } } @) before A (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } } @) before B (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } } @) before C (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } if(this.equal) { if(!host.get_integer().equals(((C)second).get_integer())) { this.equal = false; } } } @) before D (@ Object second = this.history.elementAt(this.history.size() - 1); if(this.equal) { if(second.getClass().toString().compareTo(host.getClass().toString()) != 0) { this.equal = false; } if(this.equal) { if(!host.get_integer().equals(((D)second).get_integer())) { this.equal = false; } } } @) before -> A,b,B (@ if(this.equal) { Object second = this.history.elementAt(this.history.size() - 1); this.history.addElement(((A)second).get_b()); } @) after -> A,b,B (@ if(this.equal) { this.history.removeElementAt(this.history.size() - 1); } @) before -> A,c,C (@ if(this.equal) { Object second = this.history.elementAt(this.history.size() - 1); this.history.addElement(((A)second).get_c()); } @) after -> A,c,C (@ if(this.equal) { this.history.removeElementAt(this.history.size() - 1); } @) }