All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hydra.langs.java.syntax.UnqualifiedClassInstanceCreationExpression Maven / Gradle / Ivy

package hydra.langs.java.syntax;

import java.io.Serializable;

public class UnqualifiedClassInstanceCreationExpression implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.UnqualifiedClassInstanceCreationExpression");
  
  public final java.util.List typeArguments;
  
  public final hydra.langs.java.syntax.ClassOrInterfaceTypeToInstantiate classOrInterface;
  
  public final java.util.List arguments;
  
  public final java.util.Optional body;
  
  public UnqualifiedClassInstanceCreationExpression (java.util.List typeArguments, hydra.langs.java.syntax.ClassOrInterfaceTypeToInstantiate classOrInterface, java.util.List arguments, java.util.Optional body) {
    this.typeArguments = typeArguments;
    this.classOrInterface = classOrInterface;
    this.arguments = arguments;
    this.body = body;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof UnqualifiedClassInstanceCreationExpression)) {
      return false;
    }
    UnqualifiedClassInstanceCreationExpression o = (UnqualifiedClassInstanceCreationExpression) (other);
    return typeArguments.equals(o.typeArguments) && classOrInterface.equals(o.classOrInterface) && arguments.equals(o.arguments) && body.equals(o.body);
  }
  
  @Override
  public int hashCode() {
    return 2 * typeArguments.hashCode() + 3 * classOrInterface.hashCode() + 5 * arguments.hashCode() + 7 * body.hashCode();
  }
  
  public UnqualifiedClassInstanceCreationExpression withTypeArguments(java.util.List typeArguments) {
    return new UnqualifiedClassInstanceCreationExpression(typeArguments, classOrInterface, arguments, body);
  }
  
  public UnqualifiedClassInstanceCreationExpression withClassOrInterface(hydra.langs.java.syntax.ClassOrInterfaceTypeToInstantiate classOrInterface) {
    return new UnqualifiedClassInstanceCreationExpression(typeArguments, classOrInterface, arguments, body);
  }
  
  public UnqualifiedClassInstanceCreationExpression withArguments(java.util.List arguments) {
    return new UnqualifiedClassInstanceCreationExpression(typeArguments, classOrInterface, arguments, body);
  }
  
  public UnqualifiedClassInstanceCreationExpression withBody(java.util.Optional body) {
    return new UnqualifiedClassInstanceCreationExpression(typeArguments, classOrInterface, arguments, body);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy