All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dagger.internal.codegen.binding.AutoValue_ComponentDescriptor Maven / Gradle / Ivy

There is a newer version: 2.52
Show newest version
package dagger.internal.codegen.binding;

import androidx.room.compiler.processing.XMethodElement;
import androidx.room.compiler.processing.XTypeElement;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.errorprone.annotations.concurrent.LazyInit;
import dagger.internal.codegen.base.ComponentAnnotation;
import dagger.internal.codegen.model.Scope;
import java.lang.Object;
import java.lang.Override;
import java.lang.SuppressWarnings;
import java.util.Optional;

final class AutoValue_ComponentDescriptor extends $AutoValue_ComponentDescriptor {
  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableSet requirements;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableMap childComponentsByElement;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableMap firstMatchingComponentMethods;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile int hashCode;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile boolean hashCode$Memoized;

  AutoValue_ComponentDescriptor(ComponentAnnotation annotation$, XTypeElement typeElement$,
      ImmutableSet dependencies$, ImmutableSet modules$,
      ImmutableMap dependenciesByDependencyMethod$,
      ImmutableSet scopes$,
      ImmutableSet childComponentsDeclaredByModules$,
      ImmutableBiMap childComponentsDeclaredByFactoryMethods$,
      ImmutableBiMap childComponentsDeclaredByBuilderEntryPoints$,
      ImmutableSet componentMethods$,
      Optional creatorDescriptor$) {
    super(annotation$, typeElement$, dependencies$, modules$, dependenciesByDependencyMethod$, scopes$, childComponentsDeclaredByModules$, childComponentsDeclaredByFactoryMethods$, childComponentsDeclaredByBuilderEntryPoints$, componentMethods$, creatorDescriptor$);
  }

  @Override
  ImmutableSet requirements() {
    if (requirements == null) {
      synchronized (this) {
        if (requirements == null) {
          requirements = super.requirements();
          if (requirements == null) {
            throw new NullPointerException("requirements() cannot return null");
          }
        }
      }
    }
    return requirements;
  }

  @Override
  public ImmutableMap childComponentsByElement() {
    if (childComponentsByElement == null) {
      synchronized (this) {
        if (childComponentsByElement == null) {
          childComponentsByElement = super.childComponentsByElement();
          if (childComponentsByElement == null) {
            throw new NullPointerException("childComponentsByElement() cannot return null");
          }
        }
      }
    }
    return childComponentsByElement;
  }

  @Override
  ImmutableMap firstMatchingComponentMethods() {
    if (firstMatchingComponentMethods == null) {
      synchronized (this) {
        if (firstMatchingComponentMethods == null) {
          firstMatchingComponentMethods = super.firstMatchingComponentMethods();
          if (firstMatchingComponentMethods == null) {
            throw new NullPointerException("firstMatchingComponentMethods() cannot return null");
          }
        }
      }
    }
    return firstMatchingComponentMethods;
  }

  @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_ComponentDescriptor && this.hashCode() == that.hashCode() && super.equals(that);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy