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

How to use
installUnNamedProvider
method
in
toothpick.ScopeImpl

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

origin: stephanenicolas/toothpick

/**
 * Installs a provider either in the scope or the pool of unbound providers.
 *
 * @param clazz the class for which to install the provider.
 * @param bindingName the name, possibly {@code null}, for which to install the scoped provider.
 * @param internalProvider the internal provider to install.
 * @param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers.
 * @param isTestProvider whether or not is a test provider, installed through a Test Module that should override
 *                       existing providers for the same class-bindingname.
 * @param <T> the type of {@code clazz}.
 *
 * Note to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl, boolean)}
 * and {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}
 * are a facade of this method and make the calls more clear.
 */
private <T> InternalProviderImpl installInternalProvider(Class<T> clazz, String bindingName, InternalProviderImpl<? extends T> internalProvider,
  boolean isBound, boolean isTestProvider) {
 if (bindingName == null) {
  if (isBound) {
   return installUnNamedProvider(mapClassesToUnNamedBoundProviders, clazz, internalProvider, isTestProvider);
  } else {
   return installUnNamedProvider(mapClassesToUnNamedUnBoundProviders, clazz, internalProvider, isTestProvider);
  }
 } else {
  return installNamedProvider(mapClassesToNamedBoundProviders, clazz, bindingName, internalProvider, isTestProvider);
 }
}
origin: com.github.stephanenicolas/toothpick-runtime

/**
 * Installs a provider either in the scope or the pool of unbound providers.
 *
 * @param clazz the class for which to install the provider.
 * @param bindingName the name, possibly {@code null}, for which to install the scoped provider.
 * @param internalProvider the internal provider to install.
 * @param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers
 * @param <T> the type of {@code clazz}.
 *
 * Note to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl)}
 * and {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}
 * are a facade of this method and make the calls more clear.
 */
private <T> InternalProviderImpl installInternalProvider(Class<T> clazz, String bindingName, InternalProviderImpl<? extends T> internalProvider,
  boolean isBound) {
 if (bindingName == null) {
  if (isBound) {
   return installUnNamedProvider(mapClassesToUnNamedBoundProviders, clazz, internalProvider);
  } else {
   return installUnNamedProvider(mapClassesToUnNamedUnBoundProviders, clazz, internalProvider);
  }
 } else {
  return installNamedProvider(mapClassesToNamedBoundProviders, clazz, bindingName, internalProvider);
 }
}
origin: com.github.stephanenicolas.toothpick/toothpick-runtime

/**
 * Installs a provider either in the scope or the pool of unbound providers.
 *
 * @param clazz the class for which to install the provider.
 * @param bindingName the name, possibly {@code null}, for which to install the scoped provider.
 * @param internalProvider the internal provider to install.
 * @param isBound whether or not the provider is bound to the scope or belongs to the pool of unbound providers.
 * @param isTestProvider whether or not is a test provider, installed through a Test Module that should override
 *                       existing providers for the same class-bindingname.
 * @param <T> the type of {@code clazz}.
 *
 * Note to maintainers : we don't use this method directly, both {@link #installBoundProvider(Class, String, InternalProviderImpl, boolean)}
 * and {@link #installUnBoundProvider(Class, String, InternalProviderImpl)}
 * are a facade of this method and make the calls more clear.
 */
private <T> InternalProviderImpl installInternalProvider(Class<T> clazz, String bindingName, InternalProviderImpl<? extends T> internalProvider,
  boolean isBound, boolean isTestProvider) {
 if (bindingName == null) {
  if (isBound) {
   return installUnNamedProvider(mapClassesToUnNamedBoundProviders, clazz, internalProvider, isTestProvider);
  } else {
   return installUnNamedProvider(mapClassesToUnNamedUnBoundProviders, clazz, internalProvider, isTestProvider);
  }
 } else {
  return installNamedProvider(mapClassesToNamedBoundProviders, clazz, bindingName, internalProvider, isTestProvider);
 }
}
toothpickScopeImplinstallUnNamedProvider

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
  • getBoundProvider
    Obtains the provider of the class clazz and name bindingName, if any. The returned provider will be
  • getInstance
  • getInternalProvider
    Obtains the provider of the class clazz and name bindingName. The returned provider can either be bo
  • getLazy
  • getName
  • getProvider
  • getRootScope
  • getProvider,
  • getRootScope,
  • getUnBoundProvider,
  • installBoundProvider,
  • installInternalProvider,
  • installModule,
  • installNamedProvider,
  • installScopedProvider,
  • installUnBoundProvider

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for WebStorm
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