Tabnine Logo
ScopeImpl.getBoundProvider
Code IndexAdd Tabnine to your IDE (free)

How to use
getBoundProvider
method
in
toothpick.ScopeImpl

Best Java code snippets using toothpick.ScopeImpl.getBoundProvider (Showing top 6 results out of 315)

origin: stephanenicolas/toothpick

 throw new IllegalArgumentException("TP can't get an instance of a null class.");
InternalProviderImpl<? extends T> scopedProvider = getBoundProvider(clazz, bindingName);
if (scopedProvider != null) {
 return scopedProvider;
 Scope parentScope = iterator.next();
 ScopeImpl parentScopeImpl = (ScopeImpl) parentScope;
 InternalProviderImpl<? extends T> parentScopedProvider = parentScopeImpl.getBoundProvider(clazz, bindingName);
 if (parentScopedProvider != null) {
  return parentScopedProvider;
origin: stephanenicolas/toothpick

private void installModule(boolean isTestModule, Module module) {
 for (Binding binding : module.getBindingSet()) {
  if (binding == null) {
   throw new IllegalStateException("A module can't have a null binding : " + module);
  }
  Class clazz = binding.getKey();
  String bindingName = binding.getName();
  try {
   if (isTestModule || getBoundProvider(clazz, bindingName) == null) {
    InternalProviderImpl provider = toProvider(binding);
    if (binding.isCreatingInstancesInScope()) {
     installScopedProvider(clazz, bindingName, (ScopedProviderImpl) provider, isTestModule);
    } else {
     installBoundProvider(clazz, bindingName, provider, isTestModule);
    }
   }
  } catch (Exception e) {
   throw new IllegalBindingException(format("Binding %s couldn't be installed", bindingName), e);
  }
 }
}
origin: com.github.stephanenicolas/toothpick-runtime

 throw new IllegalArgumentException("TP can't get an instance of a null class.");
InternalProviderImpl<? extends T> scopedProvider = getBoundProvider(clazz, bindingName);
if (scopedProvider != null) {
 return scopedProvider;
 Scope parentScope = iterator.next();
 ScopeImpl parentScopeImpl = (ScopeImpl) parentScope;
 InternalProviderImpl<? extends T> parentScopedProvider = parentScopeImpl.getBoundProvider(clazz, bindingName);
 if (parentScopedProvider != null) {
  return parentScopedProvider;
origin: com.github.stephanenicolas.toothpick/toothpick-runtime

 throw new IllegalArgumentException("TP can't get an instance of a null class.");
InternalProviderImpl<? extends T> scopedProvider = getBoundProvider(clazz, bindingName);
if (scopedProvider != null) {
 return scopedProvider;
 Scope parentScope = iterator.next();
 ScopeImpl parentScopeImpl = (ScopeImpl) parentScope;
 InternalProviderImpl<? extends T> parentScopedProvider = parentScopeImpl.getBoundProvider(clazz, bindingName);
 if (parentScopedProvider != null) {
  return parentScopedProvider;
origin: com.github.stephanenicolas.toothpick/toothpick-runtime

private void installModule(boolean isTestModule, Module module) {
 for (Binding binding : module.getBindingSet()) {
  if (binding == null) {
   throw new IllegalStateException("A module can't have a null binding : " + module);
  }
  Class clazz = binding.getKey();
  String bindingName = binding.getName();
  try {
   if (isTestModule || getBoundProvider(clazz, bindingName) == null) {
    InternalProviderImpl provider = toProvider(binding);
    if (binding.isCreatingInstancesInScope()) {
     installScopedProvider(clazz, bindingName, (ScopedProviderImpl) provider, isTestModule);
    } else {
     installBoundProvider(clazz, bindingName, provider, isTestModule);
    }
   }
  } catch (Exception e) {
   throw new IllegalBindingException(format("Binding %s couldn't be installed", bindingName), e);
  }
 }
}
origin: com.github.stephanenicolas/toothpick-runtime

private void installModule(Module module) {
 for (Binding binding : module.getBindingSet()) {
  if (binding == null) {
   throw new IllegalStateException("A module can't have a null binding : " + module);
  }
  Class clazz = binding.getKey();
  String bindingName = binding.getName();
  if (!hasTestModules || getBoundProvider(clazz, bindingName) == null) {
   InternalProviderImpl provider = toProvider(binding);
   if (binding.isScoped()) {
    installScopedProvider(clazz, bindingName, (ScopedProviderImpl) provider);
   } else {
    installBoundProvider(clazz, bindingName, provider);
   }
  }
 }
}
toothpickScopeImplgetBoundProvider

Javadoc

Obtains the provider of the class clazz and name bindingName, if any. The returned provider will be bound to the scope. It can be null if there is no such provider. Ancestors are not taken into account.

Popular methods of ScopeImpl

  • <init>
  • installModules
  • lookupProvider
    The core of Toothpick internals : the provider lookup. It will look for a scoped provider, bubbling
  • toProvider
  • createInternalProvider
  • getInstance
  • getInternalProvider
    Obtains the provider of the class clazz and name bindingName. The returned provider can either be bo
  • getLazy
  • getName
  • getProvider
  • getRootScope
  • getUnBoundProvider
    Obtains the provider of the class clazz and name bindingName, if any. The returned provider will bel
  • getRootScope,
  • getUnBoundProvider,
  • installBoundProvider,
  • installInternalProvider,
  • installModule,
  • installNamedProvider,
  • installScopedProvider,
  • installUnBoundProvider,
  • installUnNamedProvider

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • addToBackStack (FragmentTransaction)
  • String (java.lang)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now