public MemberDeclaration visit(MethodDeclaration methodDeclaration, BlockStatement body) { return body.equals(methodDeclaration.body) ? methodDeclaration : Expressions.methodDecl(methodDeclaration.modifier, methodDeclaration.resultType, methodDeclaration.name, methodDeclaration.parameters, body); }
public Expression visit(FunctionExpression functionExpression, BlockStatement body) { return functionExpression.body.equals(body) ? functionExpression : Expressions.lambda(body, functionExpression.parameterList); }
public MemberDeclaration visit(ConstructorDeclaration constructorDeclaration, BlockStatement body) { return body.equals(constructorDeclaration.body) ? constructorDeclaration : Expressions.constructorDecl(constructorDeclaration.modifier, constructorDeclaration.resultType, constructorDeclaration.parameters, body); } }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ConstructorDeclaration that = (ConstructorDeclaration) o; if (modifier != that.modifier) { return false; } if (!body.equals(that.body)) { return false; } if (!parameters.equals(that.parameters)) { return false; } if (!resultType.equals(that.resultType)) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } MethodDeclaration that = (MethodDeclaration) o; if (modifier != that.modifier) { return false; } if (!body.equals(that.body)) { return false; } if (!name.equals(that.name)) { return false; } if (!parameters.equals(that.parameters)) { return false; } if (!resultType.equals(that.resultType)) { return false; } return true; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } FunctionExpression that = (FunctionExpression) o; if (body != null ? !body.equals(that.body) : that.body != null) { return false; } if (function != null ? !function.equals(that.function) : that.function != null) { return false; } if (!parameterList.equals(that.parameterList)) { return false; } return true; }