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

dagger.internal.codegen.binding.AutoValue_ComponentRequirement Maven / Gradle / Ivy

There is a newer version: 2.52
Show newest version
package dagger.internal.codegen.binding;

import com.squareup.javapoet.TypeName;
import dagger.internal.codegen.model.Key;
import java.util.Optional;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ComponentRequirement extends ComponentRequirement {

  private final ComponentRequirement.Kind kind;

  private final TypeName typeName;

  private final Optional overrideNullPolicy;

  private final Optional key;

  private final String variableName;

  AutoValue_ComponentRequirement(
      ComponentRequirement.Kind kind,
      TypeName typeName,
      Optional overrideNullPolicy,
      Optional key,
      String variableName) {
    if (kind == null) {
      throw new NullPointerException("Null kind");
    }
    this.kind = kind;
    if (typeName == null) {
      throw new NullPointerException("Null typeName");
    }
    this.typeName = typeName;
    if (overrideNullPolicy == null) {
      throw new NullPointerException("Null overrideNullPolicy");
    }
    this.overrideNullPolicy = overrideNullPolicy;
    if (key == null) {
      throw new NullPointerException("Null key");
    }
    this.key = key;
    if (variableName == null) {
      throw new NullPointerException("Null variableName");
    }
    this.variableName = variableName;
  }

  @Override
  public ComponentRequirement.Kind kind() {
    return kind;
  }

  @Override
  TypeName typeName() {
    return typeName;
  }

  @Override
  Optional overrideNullPolicy() {
    return overrideNullPolicy;
  }

  @Override
  public Optional key() {
    return key;
  }

  @Override
  public String variableName() {
    return variableName;
  }

  @Override
  public String toString() {
    return "ComponentRequirement{"
        + "kind=" + kind + ", "
        + "typeName=" + typeName + ", "
        + "overrideNullPolicy=" + overrideNullPolicy + ", "
        + "key=" + key + ", "
        + "variableName=" + variableName
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ComponentRequirement) {
      ComponentRequirement that = (ComponentRequirement) o;
      return this.kind.equals(that.kind())
          && this.typeName.equals(that.typeName())
          && this.overrideNullPolicy.equals(that.overrideNullPolicy())
          && this.key.equals(that.key())
          && this.variableName.equals(that.variableName());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= kind.hashCode();
    h$ *= 1000003;
    h$ ^= typeName.hashCode();
    h$ *= 1000003;
    h$ ^= overrideNullPolicy.hashCode();
    h$ *= 1000003;
    h$ ^= key.hashCode();
    h$ *= 1000003;
    h$ ^= variableName.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy