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

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

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

import com.google.common.collect.ImmutableListMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.ImmutableSetMultimap;
import com.google.common.graph.ImmutableNetwork;
import com.google.errorprone.annotations.concurrent.LazyInit;
import dagger.internal.codegen.model.BindingGraph;
import dagger.internal.codegen.model.ComponentPath;
import java.lang.Class;
import java.lang.Override;
import java.lang.SuppressWarnings;
import java.util.Comparator;

final class AutoValue_BindingGraph_TopLevelBindingGraph extends $AutoValue_BindingGraph_TopLevelBindingGraph {
  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableSetMultimap, ? extends BindingGraph.Node> nodesByClass;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableListMultimap bindingsByComponent;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile Comparator nodeOrder;

  @LazyInit
  @SuppressWarnings("Immutable")
  private transient volatile ImmutableSet> stronglyConnectedNodes;

  AutoValue_BindingGraph_TopLevelBindingGraph(
      ImmutableNetwork network$,
      boolean isFullBindingGraph$) {
    super(network$, isFullBindingGraph$);
  }

  @Override
  public ImmutableSetMultimap, ? extends BindingGraph.Node> nodesByClass() {
    if (nodesByClass == null) {
      synchronized (this) {
        if (nodesByClass == null) {
          nodesByClass = super.nodesByClass();
          if (nodesByClass == null) {
            throw new NullPointerException("nodesByClass() cannot return null");
          }
        }
      }
    }
    return nodesByClass;
  }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy