public boolean equalsWithComments(Object o) { /* generated by template ast.ErrorIfNull*/ Log.errorIfNull(o, "0xA7006_402 Parameter 'o' must not be null."); /* generated by template ast.additionalmethods.EqualsWithComments*/ ASTExplicitConstructorInvocation comp; if ((o instanceof ASTExplicitConstructorInvocation)) { comp = (ASTExplicitConstructorInvocation) o; } else { return false; } if (!equalAttributes(comp)) { return false; } // comparing comments if (get_PreComments().size() == comp.get_PreComments().size()) { java.util.Iterator<de.monticore.ast.Comment> one = get_PreComments().iterator(); java.util.Iterator<de.monticore.ast.Comment> two = comp.get_PreComments().iterator(); while (one.hasNext()) { if (!one.next().equals(two.next())) { return false; } } } else { return false; } if (get_PostComments().size() == comp.get_PostComments().size()) { java.util.Iterator<de.monticore.ast.Comment> one = get_PostComments().iterator(); java.util.Iterator<de.monticore.ast.Comment> two = comp.get_PostComments().iterator(); while (one.hasNext()) { if (!one.next().equals(two.next())) { return false; } } } else { return false; } return true; }
public ASTExplicitConstructorInvocation deepClone(ASTExplicitConstructorInvocation result) { /* generated by template ast.ErrorIfNull*/ Log.errorIfNull(result, "0xA7006_650 Parameter 'result' must not be null."); /* generated by template ast.additionalmethods.DeepCloneWithParameters*/ super.deepClone(result); result.tHIS = this.tHIS.isPresent() ? Optional.ofNullable((String) this.tHIS.get()) : Optional.empty(); result.expressionName = this.expressionName.isPresent() ? Optional.ofNullable( (java8._ast.ASTExpressionName) this.expressionName.get().deepClone()) : Optional.empty(); result.primary = this.primary.isPresent() ? Optional.ofNullable((java8._ast.ASTPrimary) this.primary.get().deepClone()) : Optional.empty(); result.dOT = this.dOT.isPresent() ? Optional.ofNullable((String) this.dOT.get()) : Optional.empty(); result.typeArguments = this.typeArguments.isPresent() ? Optional.ofNullable( (java8._ast.ASTTypeArguments) this.typeArguments.get().deepClone()) : Optional.empty(); result.sUPER = this.sUPER.isPresent() ? Optional.ofNullable((String) this.sUPER.get()) : Optional.empty(); result.lPAREN = this.lPAREN.isPresent() ? Optional.ofNullable((String) this.lPAREN.get()) : Optional.empty(); result.argumentListX = this.argumentListX.isPresent() ? Optional.ofNullable( (java8._ast.ASTArgumentListX) this.argumentListX.get().deepClone()) : Optional.empty(); result.rPAREN = this.rPAREN.isPresent() ? Optional.ofNullable((String) this.rPAREN.get()) : Optional.empty(); result.sEMI = this.sEMI.isPresent() ? Optional.ofNullable((String) this.sEMI.get()) : Optional.empty(); result.symbol = this.symbol.isPresent() ? Optional.ofNullable((Symbol) this.symbol.get()) : Optional.empty(); result.enclosingScope = this.enclosingScope.isPresent() ? Optional.ofNullable((Scope) this.enclosingScope.get()) : Optional.empty(); return result; }