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

hydra.langs.scala.meta.Defn_Class Maven / Gradle / Ivy

package hydra.langs.scala.meta;

import java.io.Serializable;

public class Defn_Class implements Serializable {
  public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/scala/meta.Defn.Class");
  
  public final java.util.List mods;
  
  public final hydra.langs.scala.meta.Type_Name name;
  
  public final java.util.List tparams;
  
  public final hydra.langs.scala.meta.Ctor_Primary ctor;
  
  public final hydra.langs.scala.meta.Template template;
  
  public Defn_Class (java.util.List mods, hydra.langs.scala.meta.Type_Name name, java.util.List tparams, hydra.langs.scala.meta.Ctor_Primary ctor, hydra.langs.scala.meta.Template template) {
    this.mods = mods;
    this.name = name;
    this.tparams = tparams;
    this.ctor = ctor;
    this.template = template;
  }
  
  @Override
  public boolean equals(Object other) {
    if (!(other instanceof Defn_Class)) {
      return false;
    }
    Defn_Class o = (Defn_Class) (other);
    return mods.equals(o.mods) && name.equals(o.name) && tparams.equals(o.tparams) && ctor.equals(o.ctor) && template.equals(o.template);
  }
  
  @Override
  public int hashCode() {
    return 2 * mods.hashCode() + 3 * name.hashCode() + 5 * tparams.hashCode() + 7 * ctor.hashCode() + 11 * template.hashCode();
  }
  
  public Defn_Class withMods(java.util.List mods) {
    return new Defn_Class(mods, name, tparams, ctor, template);
  }
  
  public Defn_Class withName(hydra.langs.scala.meta.Type_Name name) {
    return new Defn_Class(mods, name, tparams, ctor, template);
  }
  
  public Defn_Class withTparams(java.util.List tparams) {
    return new Defn_Class(mods, name, tparams, ctor, template);
  }
  
  public Defn_Class withCtor(hydra.langs.scala.meta.Ctor_Primary ctor) {
    return new Defn_Class(mods, name, tparams, ctor, template);
  }
  
  public Defn_Class withTemplate(hydra.langs.scala.meta.Template template) {
    return new Defn_Class(mods, name, tparams, ctor, template);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy