dagger.internal.codegen.binding.AutoValue_ResolvedBindings 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.XTypeElement;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.errorprone.annotations.concurrent.LazyInit;
import dagger.internal.codegen.model.Key;
import java.lang.Object;
import java.lang.Override;
import java.lang.SuppressWarnings;
final class AutoValue_ResolvedBindings extends $AutoValue_ResolvedBindings {
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile int hashCode;
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile boolean hashCode$Memoized;
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile ImmutableSet contributionBindings;
AutoValue_ResolvedBindings(Key key$,
ImmutableSetMultimap allContributionBindings$,
ImmutableMap allMembersInjectionBindings$,
ImmutableSet multibindingDeclarations$,
ImmutableSet subcomponentDeclarations$,
ImmutableSet optionalBindingDeclarations$) {
super(key$, allContributionBindings$, allMembersInjectionBindings$, multibindingDeclarations$, subcomponentDeclarations$, optionalBindingDeclarations$);
}
@Override
public int hashCode() {
if (!hashCode$Memoized) {
synchronized (this) {
if (!hashCode$Memoized) {
hashCode = super.hashCode();
hashCode$Memoized = true;
}
}
}
return hashCode;
}
@Override
ImmutableSet contributionBindings() {
if (contributionBindings == null) {
synchronized (this) {
if (contributionBindings == null) {
contributionBindings = super.contributionBindings();
if (contributionBindings == null) {
throw new NullPointerException("contributionBindings() cannot return null");
}
}
}
}
return contributionBindings;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
return that instanceof AutoValue_ResolvedBindings && this.hashCode() == that.hashCode() && super.equals(that);
}
}