dagger.internal.codegen.binding.$AutoValue_ProductionBinding Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dagger-compiler Show documentation
Show all versions of dagger-compiler Show documentation
A fast dependency injector for Android and Java.
package dagger.internal.codegen.binding;
import androidx.room.compiler.processing.XElement;
import androidx.room.compiler.processing.XType;
import androidx.room.compiler.processing.XTypeElement;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import dagger.internal.codegen.base.ContributionType;
import dagger.internal.codegen.model.BindingKind;
import dagger.internal.codegen.model.DaggerAnnotation;
import dagger.internal.codegen.model.DependencyRequest;
import dagger.internal.codegen.model.Key;
import java.util.Optional;
// Generated by com.google.auto.value.processor.AutoValueProcessor
abstract class $AutoValue_ProductionBinding extends ProductionBinding {
private final ContributionType contributionType;
private final Key key;
private final Optional bindingElement;
private final Optional contributingModule;
private final BindingKind kind;
private final ImmutableSet explicitDependencies;
private final Nullability nullability;
private final Optional mapKey;
private final Optional unresolved;
private final Optional productionKind;
private final ImmutableList thrownTypes;
private final Optional executorRequest;
private final Optional monitorRequest;
$AutoValue_ProductionBinding(
ContributionType contributionType,
Key key,
Optional bindingElement,
Optional contributingModule,
BindingKind kind,
ImmutableSet explicitDependencies,
Nullability nullability,
Optional mapKey,
Optional unresolved,
Optional productionKind,
ImmutableList thrownTypes,
Optional executorRequest,
Optional monitorRequest) {
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 (explicitDependencies == null) {
throw new NullPointerException("Null explicitDependencies");
}
this.explicitDependencies = explicitDependencies;
if (nullability == null) {
throw new NullPointerException("Null nullability");
}
this.nullability = nullability;
if (mapKey == null) {
throw new NullPointerException("Null mapKey");
}
this.mapKey = mapKey;
if (unresolved == null) {
throw new NullPointerException("Null unresolved");
}
this.unresolved = unresolved;
if (productionKind == null) {
throw new NullPointerException("Null productionKind");
}
this.productionKind = productionKind;
if (thrownTypes == null) {
throw new NullPointerException("Null thrownTypes");
}
this.thrownTypes = thrownTypes;
if (executorRequest == null) {
throw new NullPointerException("Null executorRequest");
}
this.executorRequest = executorRequest;
if (monitorRequest == null) {
throw new NullPointerException("Null monitorRequest");
}
this.monitorRequest = monitorRequest;
}
@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 ImmutableSet explicitDependencies() {
return explicitDependencies;
}
@Override
public Nullability nullability() {
return nullability;
}
@Override
public Optional mapKey() {
return mapKey;
}
@Override
public Optional unresolved() {
return unresolved;
}
@Override
public Optional productionKind() {
return productionKind;
}
@Override
public ImmutableList thrownTypes() {
return thrownTypes;
}
@Override
Optional executorRequest() {
return executorRequest;
}
@Override
Optional monitorRequest() {
return monitorRequest;
}
@Override
public String toString() {
return "ProductionBinding{"
+ "contributionType=" + contributionType + ", "
+ "key=" + key + ", "
+ "bindingElement=" + bindingElement + ", "
+ "contributingModule=" + contributingModule + ", "
+ "kind=" + kind + ", "
+ "explicitDependencies=" + explicitDependencies + ", "
+ "nullability=" + nullability + ", "
+ "mapKey=" + mapKey + ", "
+ "unresolved=" + unresolved + ", "
+ "productionKind=" + productionKind + ", "
+ "thrownTypes=" + thrownTypes + ", "
+ "executorRequest=" + executorRequest + ", "
+ "monitorRequest=" + monitorRequest
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ProductionBinding) {
ProductionBinding that = (ProductionBinding) 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.explicitDependencies.equals(that.explicitDependencies())
&& this.nullability.equals(that.nullability())
&& this.mapKey.equals(that.mapKey())
&& this.unresolved.equals(that.unresolved())
&& this.productionKind.equals(that.productionKind())
&& this.thrownTypes.equals(that.thrownTypes())
&& this.executorRequest.equals(that.executorRequest())
&& this.monitorRequest.equals(that.monitorRequest());
}
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$ ^= explicitDependencies.hashCode();
h$ *= 1000003;
h$ ^= nullability.hashCode();
h$ *= 1000003;
h$ ^= mapKey.hashCode();
h$ *= 1000003;
h$ ^= unresolved.hashCode();
h$ *= 1000003;
h$ ^= productionKind.hashCode();
h$ *= 1000003;
h$ ^= thrownTypes.hashCode();
h$ *= 1000003;
h$ ^= executorRequest.hashCode();
h$ *= 1000003;
h$ ^= monitorRequest.hashCode();
return h$;
}
@Override
public ProductionBinding.Builder toBuilder() {
return new Builder(this);
}
static class Builder extends ProductionBinding.Builder {
private ContributionType contributionType;
private Key key;
private Optional bindingElement = Optional.empty();
private Optional contributingModule = Optional.empty();
private BindingKind kind;
private ImmutableSet explicitDependencies;
private Nullability nullability;
private Optional mapKey = Optional.empty();
private Optional unresolved = Optional.empty();
private Optional productionKind = Optional.empty();
private ImmutableList thrownTypes;
private Optional executorRequest = Optional.empty();
private Optional monitorRequest = Optional.empty();
Builder() {
}
private Builder(ProductionBinding source) {
this.contributionType = source.contributionType();
this.key = source.key();
this.bindingElement = source.bindingElement();
this.contributingModule = source.contributingModule();
this.kind = source.kind();
this.explicitDependencies = source.explicitDependencies();
this.nullability = source.nullability();
this.mapKey = source.mapKey();
this.unresolved = source.unresolved();
this.productionKind = source.productionKind();
this.thrownTypes = source.thrownTypes();
this.executorRequest = source.executorRequest();
this.monitorRequest = source.monitorRequest();
}
@Override
public ProductionBinding.Builder contributionType(ContributionType contributionType) {
if (contributionType == null) {
throw new NullPointerException("Null contributionType");
}
this.contributionType = contributionType;
return this;
}
@Override
public ProductionBinding.Builder key(Key key) {
if (key == null) {
throw new NullPointerException("Null key");
}
this.key = key;
return this;
}
@Override
public ProductionBinding.Builder bindingElement(XElement bindingElement) {
this.bindingElement = Optional.of(bindingElement);
return this;
}
@Override
ProductionBinding.Builder bindingElement(Optional bindingElement) {
if (bindingElement == null) {
throw new NullPointerException("Null bindingElement");
}
this.bindingElement = bindingElement;
return this;
}
@Override
ProductionBinding.Builder contributingModule(XTypeElement contributingModule) {
this.contributingModule = Optional.of(contributingModule);
return this;
}
@Override
public ProductionBinding.Builder kind(BindingKind kind) {
if (kind == null) {
throw new NullPointerException("Null kind");
}
this.kind = kind;
return this;
}
@Override
ProductionBinding.Builder explicitDependencies(Iterable explicitDependencies) {
this.explicitDependencies = ImmutableSet.copyOf(explicitDependencies);
return this;
}
@Override
public ProductionBinding.Builder nullability(Nullability nullability) {
if (nullability == null) {
throw new NullPointerException("Null nullability");
}
this.nullability = nullability;
return this;
}
@Override
ProductionBinding.Builder mapKey(Optional mapKey) {
if (mapKey == null) {
throw new NullPointerException("Null mapKey");
}
this.mapKey = mapKey;
return this;
}
@Override
public ProductionBinding.Builder unresolved(ProductionBinding unresolved) {
this.unresolved = Optional.of(unresolved);
return this;
}
@Override
ProductionBinding.Builder productionKind(ProductionBinding.ProductionKind productionKind) {
this.productionKind = Optional.of(productionKind);
return this;
}
@Override
ProductionBinding.Builder thrownTypes(Iterable thrownTypes) {
this.thrownTypes = ImmutableList.copyOf(thrownTypes);
return this;
}
@Override
ProductionBinding.Builder executorRequest(DependencyRequest executorRequest) {
this.executorRequest = Optional.of(executorRequest);
return this;
}
@Override
ProductionBinding.Builder monitorRequest(DependencyRequest monitorRequest) {
this.monitorRequest = Optional.of(monitorRequest);
return this;
}
@Override
ProductionBinding build() {
if (this.contributionType == null
|| this.key == null
|| this.kind == null
|| this.explicitDependencies == null
|| this.nullability == null
|| this.thrownTypes == null) {
StringBuilder missing = new StringBuilder();
if (this.contributionType == null) {
missing.append(" contributionType");
}
if (this.key == null) {
missing.append(" key");
}
if (this.kind == null) {
missing.append(" kind");
}
if (this.explicitDependencies == null) {
missing.append(" explicitDependencies");
}
if (this.nullability == null) {
missing.append(" nullability");
}
if (this.thrownTypes == null) {
missing.append(" thrownTypes");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ProductionBinding(
this.contributionType,
this.key,
this.bindingElement,
this.contributingModule,
this.kind,
this.explicitDependencies,
this.nullability,
this.mapKey,
this.unresolved,
this.productionKind,
this.thrownTypes,
this.executorRequest,
this.monitorRequest);
}
}
}