dagger.internal.codegen.binding.$AutoValue_MembersInjectionBinding 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.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 extends Binding> unresolved;
private final ImmutableSortedSet injectionSites;
$AutoValue_MembersInjectionBinding(
Key key,
Optional extends Binding> 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 extends Binding> 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 extends Binding> 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 extends Binding> 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);
}
}
}