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

dagger.hilt.processor.internal.root.AutoValue_Root Maven / Gradle / Ivy

There is a newer version: 2.45-kim-rc1
Show newest version


package dagger.hilt.processor.internal.root;

import javax.annotation.Generated;
import javax.lang.model.element.TypeElement;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_Root extends Root {

  private final TypeElement element;
  private final TypeElement originatingRootElement;
  private final boolean isTestRoot;

  AutoValue_Root(
      TypeElement element,
      TypeElement originatingRootElement,
      boolean isTestRoot) {
    if (element == null) {
      throw new NullPointerException("Null element");
    }
    this.element = element;
    if (originatingRootElement == null) {
      throw new NullPointerException("Null originatingRootElement");
    }
    this.originatingRootElement = originatingRootElement;
    this.isTestRoot = isTestRoot;
  }

  @Override
  TypeElement element() {
    return element;
  }

  @Override
  TypeElement originatingRootElement() {
    return originatingRootElement;
  }

  @Override
  boolean isTestRoot() {
    return isTestRoot;
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Root) {
      Root that = (Root) o;
      return (this.element.equals(that.element()))
           && (this.originatingRootElement.equals(that.originatingRootElement()))
           && (this.isTestRoot == that.isTestRoot());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= element.hashCode();
    h$ *= 1000003;
    h$ ^= originatingRootElement.hashCode();
    h$ *= 1000003;
    h$ ^= isTestRoot ? 1231 : 1237;
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy