dagger.internal.codegen.model.AutoValue_ComponentPath 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 com.google.common.collect.ImmutableList;
import com.google.errorprone.annotations.concurrent.LazyInit;
import java.lang.Object;
import java.lang.Override;
import java.lang.SuppressWarnings;
final class AutoValue_ComponentPath extends $AutoValue_ComponentPath {
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile DaggerTypeElement currentComponent;
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile int hashCode;
@LazyInit
@SuppressWarnings("Immutable")
private transient volatile boolean hashCode$Memoized;
AutoValue_ComponentPath(ImmutableList components$) {
super(components$);
}
@Override
public DaggerTypeElement currentComponent() {
if (currentComponent == null) {
synchronized (this) {
if (currentComponent == null) {
currentComponent = super.currentComponent();
if (currentComponent == null) {
throw new NullPointerException("currentComponent() cannot return null");
}
}
}
}
return currentComponent;
}
@Override
public int hashCode() {
if (!hashCode$Memoized) {
synchronized (this) {
if (!hashCode$Memoized) {
hashCode = super.hashCode();
hashCode$Memoized = true;
}
}
}
return hashCode;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
return that instanceof AutoValue_ComponentPath && this.hashCode() == that.hashCode() && super.equals(that);
}
}