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

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

package hydra.langs.java.syntax;

import java.io.Serializable;

public class MethodInvocation implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.MethodInvocation");
  
  public final hydra.langs.java.syntax.MethodInvocation_Header header;
  
  public final java.util.List arguments;
  
  public MethodInvocation (hydra.langs.java.syntax.MethodInvocation_Header header, java.util.List arguments) {
    this.header = header;
    this.arguments = arguments;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof MethodInvocation)) {
      return false;
    }
    MethodInvocation o = (MethodInvocation) (other);
    return header.equals(o.header) && arguments.equals(o.arguments);
  }
  
  @Override
  public int hashCode() {
    return 2 * header.hashCode() + 3 * arguments.hashCode();
  }
  
  public MethodInvocation withHeader(hydra.langs.java.syntax.MethodInvocation_Header header) {
    return new MethodInvocation(header, arguments);
  }
  
  public MethodInvocation withArguments(java.util.List arguments) {
    return new MethodInvocation(header, arguments);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy