dagger.internal.codegen.model.$AutoValue_Key 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.
The newest version!
package dagger.internal.codegen.model;
import java.util.Optional;
// Generated by com.google.auto.value.processor.AutoValueProcessor
abstract class $AutoValue_Key extends Key {
private final Optional qualifier;
private final DaggerType type;
private final Optional multibindingContributionIdentifier;
$AutoValue_Key(
Optional qualifier,
DaggerType type,
Optional multibindingContributionIdentifier) {
if (qualifier == null) {
throw new NullPointerException("Null qualifier");
}
this.qualifier = qualifier;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (multibindingContributionIdentifier == null) {
throw new NullPointerException("Null multibindingContributionIdentifier");
}
this.multibindingContributionIdentifier = multibindingContributionIdentifier;
}
@Override
public Optional qualifier() {
return qualifier;
}
@Override
public DaggerType type() {
return type;
}
@Override
public Optional multibindingContributionIdentifier() {
return multibindingContributionIdentifier;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Key) {
Key that = (Key) o;
return this.qualifier.equals(that.qualifier())
&& this.type.equals(that.type())
&& this.multibindingContributionIdentifier.equals(that.multibindingContributionIdentifier());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= qualifier.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
h$ *= 1000003;
h$ ^= multibindingContributionIdentifier.hashCode();
return h$;
}
@Override
Key.Builder toBuilder() {
return new Builder(this);
}
static class Builder extends Key.Builder {
private Optional qualifier = Optional.empty();
private DaggerType type;
private Optional multibindingContributionIdentifier = Optional.empty();
Builder() {
}
private Builder(Key source) {
this.qualifier = source.qualifier();
this.type = source.type();
this.multibindingContributionIdentifier = source.multibindingContributionIdentifier();
}
@Override
public Key.Builder qualifier(Optional qualifier) {
if (qualifier == null) {
throw new NullPointerException("Null qualifier");
}
this.qualifier = qualifier;
return this;
}
@Override
public Key.Builder qualifier(DaggerAnnotation qualifier) {
this.qualifier = Optional.of(qualifier);
return this;
}
@Override
public Key.Builder type(DaggerType type) {
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
return this;
}
@Override
Key.Builder multibindingContributionIdentifier(Optional multibindingContributionIdentifier) {
if (multibindingContributionIdentifier == null) {
throw new NullPointerException("Null multibindingContributionIdentifier");
}
this.multibindingContributionIdentifier = multibindingContributionIdentifier;
return this;
}
@Override
public Key build() {
if (this.type == null) {
String missing = " type";
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_Key(
this.qualifier,
this.type,
this.multibindingContributionIdentifier);
}
}
}