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

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

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

import androidx.room.compiler.processing.XElement;
import androidx.room.compiler.processing.XTypeElement;
import dagger.internal.codegen.base.ContributionType;
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_DelegateBinding extends DelegateBinding {

  private final ContributionType contributionType;

  private final Key key;

  private final Optional bindingElement;

  private final Optional contributingModule;

  private final BindingType bindingType;

  private final Optional unresolved;

  private final Optional scope;

  private final Nullability nullability;

  private final DependencyRequest delegateRequest;

  $AutoValue_DelegateBinding(
      ContributionType contributionType,
      Key key,
      Optional bindingElement,
      Optional contributingModule,
      BindingType bindingType,
      Optional unresolved,
      Optional scope,
      Nullability nullability,
      DependencyRequest delegateRequest) {
    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 (bindingType == null) {
      throw new NullPointerException("Null bindingType");
    }
    this.bindingType = bindingType;
    if (unresolved == null) {
      throw new NullPointerException("Null unresolved");
    }
    this.unresolved = unresolved;
    if (scope == null) {
      throw new NullPointerException("Null scope");
    }
    this.scope = scope;
    if (nullability == null) {
      throw new NullPointerException("Null nullability");
    }
    this.nullability = nullability;
    if (delegateRequest == null) {
      throw new NullPointerException("Null delegateRequest");
    }
    this.delegateRequest = delegateRequest;
  }

  @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 BindingType bindingType() {
    return bindingType;
  }

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

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

  @Override
  public Nullability nullability() {
    return nullability;
  }

  @Override
  DependencyRequest delegateRequest() {
    return delegateRequest;
  }

  @Override
  public String toString() {
    return "DelegateBinding{"
        + "contributionType=" + contributionType + ", "
        + "key=" + key + ", "
        + "bindingElement=" + bindingElement + ", "
        + "contributingModule=" + contributingModule + ", "
        + "bindingType=" + bindingType + ", "
        + "unresolved=" + unresolved + ", "
        + "scope=" + scope + ", "
        + "nullability=" + nullability + ", "
        + "delegateRequest=" + delegateRequest
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof DelegateBinding) {
      DelegateBinding that = (DelegateBinding) o;
      return this.contributionType.equals(that.contributionType())
          && this.key.equals(that.key())
          && this.bindingElement.equals(that.bindingElement())
          && this.contributingModule.equals(that.contributingModule())
          && this.bindingType.equals(that.bindingType())
          && this.unresolved.equals(that.unresolved())
          && this.scope.equals(that.scope())
          && this.nullability.equals(that.nullability())
          && this.delegateRequest.equals(that.delegateRequest());
    }
    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$ ^= bindingType.hashCode();
    h$ *= 1000003;
    h$ ^= unresolved.hashCode();
    h$ *= 1000003;
    h$ ^= scope.hashCode();
    h$ *= 1000003;
    h$ ^= nullability.hashCode();
    h$ *= 1000003;
    h$ ^= delegateRequest.hashCode();
    return h$;
  }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy