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

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

There is a newer version: 2.54
Show newest version


package dagger.internal.codegen.binding;

import com.google.common.base.Equivalence;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSortedSet;
import dagger.internal.codegen.base.ContributionType;
import dagger.spi.model.BindingKind;
import dagger.spi.model.DependencyRequest;
import dagger.spi.model.Key;
import dagger.spi.model.Scope;
import java.util.Optional;
import javax.annotation.Generated;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 abstract class $AutoValue_ProvisionBinding extends ProvisionBinding {

  private final ContributionType contributionType;
  private final Key key;
  private final Optional bindingElement;
  private final Optional contributingModule;
  private final BindingKind kind;
  private final Optional nullableType;
  private final Optional> wrappedMapKeyAnnotation;
  private final Optional isContributingModuleKotlinObject;
  private final ImmutableSet provisionDependencies;
  private final ImmutableSortedSet injectionSites;
  private final Optional unresolved;
  private final Optional scope;

  $AutoValue_ProvisionBinding(
      ContributionType contributionType,
      Key key,
      Optional bindingElement,
      Optional contributingModule,
      BindingKind kind,
      Optional nullableType,
      Optional> wrappedMapKeyAnnotation,
      Optional isContributingModuleKotlinObject,
      ImmutableSet provisionDependencies,
      ImmutableSortedSet injectionSites,
      Optional unresolved,
      Optional scope) {
    if (contributionType == null) {
      throw new NullPointerException("Null contributionType");
    }
    this.contributionType = contributionType;
    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 (kind == null) {
      throw new NullPointerException("Null kind");
    }
    this.kind = kind;
    if (nullableType == null) {
      throw new NullPointerException("Null nullableType");
    }
    this.nullableType = nullableType;
    if (wrappedMapKeyAnnotation == null) {
      throw new NullPointerException("Null wrappedMapKeyAnnotation");
    }
    this.wrappedMapKeyAnnotation = wrappedMapKeyAnnotation;
    if (isContributingModuleKotlinObject == null) {
      throw new NullPointerException("Null isContributingModuleKotlinObject");
    }
    this.isContributingModuleKotlinObject = isContributingModuleKotlinObject;
    if (provisionDependencies == null) {
      throw new NullPointerException("Null provisionDependencies");
    }
    this.provisionDependencies = provisionDependencies;
    if (injectionSites == null) {
      throw new NullPointerException("Null injectionSites");
    }
    this.injectionSites = injectionSites;
    if (unresolved == null) {
      throw new NullPointerException("Null unresolved");
    }
    this.unresolved = unresolved;
    if (scope == null) {
      throw new NullPointerException("Null scope");
    }
    this.scope = scope;
  }

  @Override
  public ContributionType contributionType() {
    return contributionType;
  }

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

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

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

  @Override
  public BindingKind kind() {
    return kind;
  }

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

  @Override
  public Optional> wrappedMapKeyAnnotation() {
    return wrappedMapKeyAnnotation;
  }

  @Override
  Optional isContributingModuleKotlinObject() {
    return isContributingModuleKotlinObject;
  }

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

  @Override
  public ImmutableSortedSet injectionSites() {
    return injectionSites;
  }

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

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

  @Override
  public String toString() {
    return "ProvisionBinding{"
         + "contributionType=" + contributionType + ", "
         + "key=" + key + ", "
         + "bindingElement=" + bindingElement + ", "
         + "contributingModule=" + contributingModule + ", "
         + "kind=" + kind + ", "
         + "nullableType=" + nullableType + ", "
         + "wrappedMapKeyAnnotation=" + wrappedMapKeyAnnotation + ", "
         + "isContributingModuleKotlinObject=" + isContributingModuleKotlinObject + ", "
         + "provisionDependencies=" + provisionDependencies + ", "
         + "injectionSites=" + injectionSites + ", "
         + "unresolved=" + unresolved + ", "
         + "scope=" + scope
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ProvisionBinding) {
      ProvisionBinding that = (ProvisionBinding) o;
      return (this.contributionType.equals(that.contributionType()))
           && (this.key.equals(that.key()))
           && (this.bindingElement.equals(that.bindingElement()))
           && (this.contributingModule.equals(that.contributingModule()))
           && (this.kind.equals(that.kind()))
           && (this.nullableType.equals(that.nullableType()))
           && (this.wrappedMapKeyAnnotation.equals(that.wrappedMapKeyAnnotation()))
           && (this.isContributingModuleKotlinObject.equals(that.isContributingModuleKotlinObject()))
           && (this.provisionDependencies.equals(that.provisionDependencies()))
           && (this.injectionSites.equals(that.injectionSites()))
           && (this.unresolved.equals(that.unresolved()))
           && (this.scope.equals(that.scope()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= contributionType.hashCode();
    h$ *= 1000003;
    h$ ^= key.hashCode();
    h$ *= 1000003;
    h$ ^= bindingElement.hashCode();
    h$ *= 1000003;
    h$ ^= contributingModule.hashCode();
    h$ *= 1000003;
    h$ ^= kind.hashCode();
    h$ *= 1000003;
    h$ ^= nullableType.hashCode();
    h$ *= 1000003;
    h$ ^= wrappedMapKeyAnnotation.hashCode();
    h$ *= 1000003;
    h$ ^= isContributingModuleKotlinObject.hashCode();
    h$ *= 1000003;
    h$ ^= provisionDependencies.hashCode();
    h$ *= 1000003;
    h$ ^= injectionSites.hashCode();
    h$ *= 1000003;
    h$ ^= unresolved.hashCode();
    h$ *= 1000003;
    h$ ^= scope.hashCode();
    return h$;
  }

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

  static final class Builder extends ProvisionBinding.Builder {
    private ContributionType contributionType;
    private Key key;
    private Optional bindingElement = Optional.empty();
    private Optional contributingModule = Optional.empty();
    private BindingKind kind;
    private Optional nullableType = Optional.empty();
    private Optional> wrappedMapKeyAnnotation = Optional.empty();
    private Optional isContributingModuleKotlinObject = Optional.empty();
    private ImmutableSet provisionDependencies;
    private ImmutableSortedSet injectionSites;
    private Optional unresolved = Optional.empty();
    private Optional scope = Optional.empty();
    Builder() {
    }
    private Builder(ProvisionBinding source) {
      this.contributionType = source.contributionType();
      this.key = source.key();
      this.bindingElement = source.bindingElement();
      this.contributingModule = source.contributingModule();
      this.kind = source.kind();
      this.nullableType = source.nullableType();
      this.wrappedMapKeyAnnotation = source.wrappedMapKeyAnnotation();
      this.isContributingModuleKotlinObject = source.isContributingModuleKotlinObject();
      this.provisionDependencies = source.provisionDependencies();
      this.injectionSites = source.injectionSites();
      this.unresolved = source.unresolved();
      this.scope = source.scope();
    }
    @Override
    public ProvisionBinding.Builder contributionType(ContributionType contributionType) {
      if (contributionType == null) {
        throw new NullPointerException("Null contributionType");
      }
      this.contributionType = contributionType;
      return this;
    }
    @Override
    public ProvisionBinding.Builder key(Key key) {
      if (key == null) {
        throw new NullPointerException("Null key");
      }
      this.key = key;
      return this;
    }
    @Override
    public ProvisionBinding.Builder bindingElement(Element bindingElement) {
      if (bindingElement == null) {
        throw new NullPointerException("Null bindingElement");
      }
      this.bindingElement = Optional.of(bindingElement);
      return this;
    }
    @Override
    ProvisionBinding.Builder bindingElement(Optional bindingElement) {
      if (bindingElement == null) {
        throw new NullPointerException("Null bindingElement");
      }
      this.bindingElement = bindingElement;
      return this;
    }
    @Override
    ProvisionBinding.Builder contributingModule(TypeElement contributingModule) {
      if (contributingModule == null) {
        throw new NullPointerException("Null contributingModule");
      }
      this.contributingModule = Optional.of(contributingModule);
      return this;
    }
    @Override
    public ProvisionBinding.Builder kind(BindingKind kind) {
      if (kind == null) {
        throw new NullPointerException("Null kind");
      }
      this.kind = kind;
      return this;
    }
    @Override
    public ProvisionBinding.Builder nullableType(Optional nullableType) {
      if (nullableType == null) {
        throw new NullPointerException("Null nullableType");
      }
      this.nullableType = nullableType;
      return this;
    }
    @Override
    ProvisionBinding.Builder wrappedMapKeyAnnotation(Optional> wrappedMapKeyAnnotation) {
      if (wrappedMapKeyAnnotation == null) {
        throw new NullPointerException("Null wrappedMapKeyAnnotation");
      }
      this.wrappedMapKeyAnnotation = wrappedMapKeyAnnotation;
      return this;
    }
    @Override
    ProvisionBinding.Builder isContributingModuleKotlinObject(boolean isContributingModuleKotlinObject) {
      this.isContributingModuleKotlinObject = Optional.of(isContributingModuleKotlinObject);
      return this;
    }
    @Override
    ProvisionBinding.Builder provisionDependencies(Iterable provisionDependencies) {
      if (provisionDependencies == null) {
        throw new NullPointerException("Null provisionDependencies");
      }
      this.provisionDependencies = ImmutableSet.copyOf(provisionDependencies);
      return this;
    }
    @Override
    public ProvisionBinding.Builder injectionSites(ImmutableSortedSet injectionSites) {
      if (injectionSites == null) {
        throw new NullPointerException("Null injectionSites");
      }
      this.injectionSites = injectionSites;
      return this;
    }
    @Override
    public ProvisionBinding.Builder unresolved(ProvisionBinding unresolved) {
      if (unresolved == null) {
        throw new NullPointerException("Null unresolved");
      }
      this.unresolved = Optional.of(unresolved);
      return this;
    }
    @Override
    public ProvisionBinding.Builder scope(Optional scope) {
      if (scope == null) {
        throw new NullPointerException("Null scope");
      }
      this.scope = scope;
      return this;
    }
    @Override
    ProvisionBinding autoBuild() {
      String missing = "";
      if (this.contributionType == null) {
        missing += " contributionType";
      }
      if (this.key == null) {
        missing += " key";
      }
      if (this.kind == null) {
        missing += " kind";
      }
      if (this.provisionDependencies == null) {
        missing += " provisionDependencies";
      }
      if (this.injectionSites == null) {
        missing += " injectionSites";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ProvisionBinding(
          this.contributionType,
          this.key,
          this.bindingElement,
          this.contributingModule,
          this.kind,
          this.nullableType,
          this.wrappedMapKeyAnnotation,
          this.isContributingModuleKotlinObject,
          this.provisionDependencies,
          this.injectionSites,
          this.unresolved,
          this.scope);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy