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

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

The newest version!
package dagger.internal.codegen.binding;

import com.google.common.collect.ImmutableList;
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 ImmutableList> 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 ImmutableList> 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