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

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

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

import com.google.common.collect.ImmutableSortedSet;
import dagger.internal.codegen.model.Key;
import java.util.Optional;

// Generated by com.google.auto.value.processor.AutoValueProcessor
abstract class $AutoValue_MembersInjectionBinding extends MembersInjectionBinding {

  private final Key key;

  private final Optional unresolved;

  private final ImmutableSortedSet injectionSites;

  $AutoValue_MembersInjectionBinding(
      Key key,
      Optional unresolved,
      ImmutableSortedSet injectionSites) {
    if (key == null) {
      throw new NullPointerException("Null key");
    }
    this.key = key;
    if (unresolved == null) {
      throw new NullPointerException("Null unresolved");
    }
    this.unresolved = unresolved;
    if (injectionSites == null) {
      throw new NullPointerException("Null injectionSites");
    }
    this.injectionSites = injectionSites;
  }

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

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

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

  @Override
  public String toString() {
    return "MembersInjectionBinding{"
        + "key=" + key + ", "
        + "unresolved=" + unresolved + ", "
        + "injectionSites=" + injectionSites
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof MembersInjectionBinding) {
      MembersInjectionBinding that = (MembersInjectionBinding) o;
      return this.key.equals(that.key())
          && this.unresolved.equals(that.unresolved())
          && this.injectionSites.equals(that.injectionSites());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= key.hashCode();
    h$ *= 1000003;
    h$ ^= unresolved.hashCode();
    h$ *= 1000003;
    h$ ^= injectionSites.hashCode();
    return h$;
  }

  static class Builder extends MembersInjectionBinding.Builder {
    private Key key;
    private Optional unresolved = Optional.empty();
    private ImmutableSortedSet injectionSites;
    Builder() {
    }
    @Override
    MembersInjectionBinding.Builder key(Key key) {
      if (key == null) {
        throw new NullPointerException("Null key");
      }
      this.key = key;
      return this;
    }
    @Override
    MembersInjectionBinding.Builder unresolved(Optional unresolved) {
      if (unresolved == null) {
        throw new NullPointerException("Null unresolved");
      }
      this.unresolved = unresolved;
      return this;
    }
    @Override
    MembersInjectionBinding.Builder injectionSites(ImmutableSortedSet injectionSites) {
      if (injectionSites == null) {
        throw new NullPointerException("Null injectionSites");
      }
      this.injectionSites = injectionSites;
      return this;
    }
    @Override
    MembersInjectionBinding build() {
      if (this.key == null
          || this.injectionSites == null) {
        StringBuilder missing = new StringBuilder();
        if (this.key == null) {
          missing.append(" key");
        }
        if (this.injectionSites == null) {
          missing.append(" injectionSites");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_MembersInjectionBinding(
          this.key,
          this.unresolved,
          this.injectionSites);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy