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

dagger.internal.codegen.binding.$AutoValue_MultiboundMapBinding Maven / Gradle / Ivy

The newest version!
package dagger.internal.codegen.binding;

import androidx.room.compiler.processing.XElement;
import androidx.room.compiler.processing.XTypeElement;
import com.google.common.collect.ImmutableSet;
import dagger.internal.codegen.model.DependencyRequest;
import dagger.internal.codegen.model.Key;
import dagger.internal.codegen.model.Scope;
import java.util.Optional;

// Generated by com.google.auto.value.processor.AutoValueProcessor
abstract class $AutoValue_MultiboundMapBinding extends MultiboundMapBinding {

  private final Key key;

  private final Optional bindingElement;

  private final Optional contributingModule;

  private final BindingType bindingType;

  private final ImmutableSet dependencies;

  private final Optional unresolved;

  private final Optional scope;

  $AutoValue_MultiboundMapBinding(
      Key key,
      Optional bindingElement,
      Optional contributingModule,
      BindingType bindingType,
      ImmutableSet dependencies,
      Optional unresolved,
      Optional scope) {
    if (key == null) {
      throw new NullPointerException("Null key");
    }
    this.key = key;
    if (bindingElement == null) {
      throw new NullPointerException("Null bindingElement");
    }
    this.bindingElement = bindingElement;
    if (contributingModule == null) {
      throw new NullPointerException("Null contributingModule");
    }
    this.contributingModule = contributingModule;
    if (bindingType == null) {
      throw new NullPointerException("Null bindingType");
    }
    this.bindingType = bindingType;
    if (dependencies == null) {
      throw new NullPointerException("Null dependencies");
    }
    this.dependencies = dependencies;
    if (unresolved == null) {
      throw new NullPointerException("Null unresolved");
    }
    this.unresolved = unresolved;
    if (scope == null) {
      throw new NullPointerException("Null scope");
    }
    this.scope = scope;
  }

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

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

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

  @Override
  public BindingType bindingType() {
    return bindingType;
  }

  @Override
  public ImmutableSet dependencies() {
    return dependencies;
  }

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

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

  @Override
  public String toString() {
    return "MultiboundMapBinding{"
        + "key=" + key + ", "
        + "bindingElement=" + bindingElement + ", "
        + "contributingModule=" + contributingModule + ", "
        + "bindingType=" + bindingType + ", "
        + "dependencies=" + dependencies + ", "
        + "unresolved=" + unresolved + ", "
        + "scope=" + scope
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MultiboundMapBinding) {
      MultiboundMapBinding that = (MultiboundMapBinding) o;
      return this.key.equals(that.key())
          && this.bindingElement.equals(that.bindingElement())
          && this.contributingModule.equals(that.contributingModule())
          && this.bindingType.equals(that.bindingType())
          && this.dependencies.equals(that.dependencies())
          && this.unresolved.equals(that.unresolved())
          && this.scope.equals(that.scope());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= key.hashCode();
    h$ *= 1000003;
    h$ ^= bindingElement.hashCode();
    h$ *= 1000003;
    h$ ^= contributingModule.hashCode();
    h$ *= 1000003;
    h$ ^= bindingType.hashCode();
    h$ *= 1000003;
    h$ ^= dependencies.hashCode();
    h$ *= 1000003;
    h$ ^= unresolved.hashCode();
    h$ *= 1000003;
    h$ ^= scope.hashCode();
    return h$;
  }

  @Override
  public MultiboundMapBinding.Builder toBuilder() {
    return new Builder(this);
  }

  static class Builder extends MultiboundMapBinding.Builder {
    private Key key;
    private Optional bindingElement = Optional.empty();
    private Optional contributingModule = Optional.empty();
    private BindingType bindingType;
    private ImmutableSet dependencies;
    private Optional unresolved = Optional.empty();
    private Optional scope = Optional.empty();
    Builder() {
    }
    private Builder(MultiboundMapBinding source) {
      this.key = source.key();
      this.bindingElement = source.bindingElement();
      this.contributingModule = source.contributingModule();
      this.bindingType = source.bindingType();
      this.dependencies = source.dependencies();
      this.unresolved = source.unresolved();
      this.scope = source.scope();
    }
    @Override
    MultiboundMapBinding.Builder key(Key key) {
      if (key == null) {
        throw new NullPointerException("Null key");
      }
      this.key = key;
      return this;
    }
    @Override
    MultiboundMapBinding.Builder bindingElement(XElement bindingElement) {
      this.bindingElement = Optional.of(bindingElement);
      return this;
    }
    @Override
    MultiboundMapBinding.Builder bindingElement(Optional bindingElement) {
      if (bindingElement == null) {
        throw new NullPointerException("Null bindingElement");
      }
      this.bindingElement = bindingElement;
      return this;
    }
    @Override
    MultiboundMapBinding.Builder contributingModule(XTypeElement contributingModule) {
      this.contributingModule = Optional.of(contributingModule);
      return this;
    }
    @Override
    MultiboundMapBinding.Builder bindingType(BindingType bindingType) {
      if (bindingType == null) {
        throw new NullPointerException("Null bindingType");
      }
      this.bindingType = bindingType;
      return this;
    }
    @Override
    MultiboundMapBinding.Builder dependencies(ImmutableSet dependencies) {
      if (dependencies == null) {
        throw new NullPointerException("Null dependencies");
      }
      this.dependencies = dependencies;
      return this;
    }
    @Override
    MultiboundMapBinding.Builder unresolved(Optional unresolved) {
      if (unresolved == null) {
        throw new NullPointerException("Null unresolved");
      }
      this.unresolved = unresolved;
      return this;
    }
    @Override
    MultiboundMapBinding.Builder scope(Optional scope) {
      if (scope == null) {
        throw new NullPointerException("Null scope");
      }
      this.scope = scope;
      return this;
    }
    @Override
    MultiboundMapBinding build() {
      if (this.key == null
          || this.bindingType == null
          || this.dependencies == null) {
        StringBuilder missing = new StringBuilder();
        if (this.key == null) {
          missing.append(" key");
        }
        if (this.bindingType == null) {
          missing.append(" bindingType");
        }
        if (this.dependencies == null) {
          missing.append(" dependencies");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_MultiboundMapBinding(
          this.key,
          this.bindingElement,
          this.contributingModule,
          this.bindingType,
          this.dependencies,
          this.unresolved,
          this.scope);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy