Tabnine Logo
ProviderMethodsModule.forModule
Code IndexAdd Tabnine to your IDE (free)

How to use
forModule
method
in
com.google.inject.internal.ProviderMethodsModule

Best Java code snippets using com.google.inject.internal.ProviderMethodsModule.forModule (Showing top 15 results out of 315)

origin: com.google.inject/guice

/**
 * Applies all scanners to the modules we've installed. We skip certain PrivateModules because
 * store them in more than one Modules map and only want to process them through one of the
 * maps. (They're stored in both maps to prevent a module from being installed more than once.)
 */
void scanForAnnotatedMethods() {
 for (ModuleAnnotatedMethodScanner scanner : scanners) {
  // Note: we must iterate over a copy of the modules because calling install(..)
  // will mutate modules, otherwise causing a ConcurrentModificationException.
  for (Map.Entry<Module, ModuleInfo> entry : Maps.newLinkedHashMap(modules).entrySet()) {
   Module module = entry.getKey();
   ModuleInfo info = entry.getValue();
   if (info.skipScanning) {
    continue;
   }
   moduleSource = entry.getValue().moduleSource;
   try {
    info.binder.install(ProviderMethodsModule.forModule(module, scanner));
   } catch (RuntimeException e) {
    Collection<Message> messages = Errors.getMessagesFromThrowable(e);
    if (!messages.isEmpty()) {
     elements.addAll(messages);
    } else {
     addError(e);
    }
   }
  }
 }
 moduleSource = null;
}
origin: com.google.inject/guice

binder.install(ProviderMethodsModule.forModule(module));
origin: org.atteo.moonshine/container

  @Override
  public void configure(Binder binder) {
    if (modules.add(module)) {
      module.configure(createForwardingBinder(binder));
      binder.install(ProviderMethodsModule.forModule(module));
    }
  }
};
origin: com.jwebmp.inject/guice

/**
 * Applies all scanners to the modules we've installed. We skip certain PrivateModules because
 * store them in more than one Modules map and only want to process them through one of the
 * maps. (They're stored in both maps to prevent a module from being installed more than once.)
 */
void scanForAnnotatedMethods() {
 for (ModuleAnnotatedMethodScanner scanner : scanners) {
  // Note: we must iterate over a copy of the modules because calling install(..)
  // will mutate modules, otherwise causing a ConcurrentModificationException.
  for (Map.Entry<Module, ModuleInfo> entry : Maps.newLinkedHashMap(modules).entrySet()) {
   Module module = entry.getKey();
   ModuleInfo info = entry.getValue();
   if (info.skipScanning) {
    continue;
   }
   moduleSource = entry.getValue().moduleSource;
   try {
    info.binder.install(ProviderMethodsModule.forModule(module, scanner));
   } catch (RuntimeException e) {
    Collection<Message> messages = Errors.getMessagesFromThrowable(e);
    if (!messages.isEmpty()) {
     elements.addAll(messages);
    } else {
     addError(e);
    }
   }
  }
 }
 moduleSource = null;
}
origin: org.atteo.moonshine/container

  @Override
  protected void configure() {
    if (modules.add(module)) {
      module.configure(createForwardingBinder(binder()));
      install(ProviderMethodsModule.forModule(module));
    }
  }
};
origin: org.sonatype.sisu/sisu-guice

/**
 * Applies all scanners to the modules we've installed. We skip certain PrivateModules because
 * store them in more than one Modules map and only want to process them through one of the
 * maps. (They're stored in both maps to prevent a module from being installed more than once.)
 */
void scanForAnnotatedMethods() {
 for (ModuleAnnotatedMethodScanner scanner : scanners) {
  // Note: we must iterate over a copy of the modules because calling install(..)
  // will mutate modules, otherwise causing a ConcurrentModificationException.
  for (Map.Entry<Module, ModuleInfo> entry : Maps.newLinkedHashMap(modules).entrySet()) {
   Module module = entry.getKey();
   ModuleInfo info = entry.getValue();
   if (info.skipScanning) {
    continue;
   }
   moduleSource = entry.getValue().moduleSource;
   try {
    info.binder.install(ProviderMethodsModule.forModule(module, scanner));
   } catch (RuntimeException e) {
    Collection<Message> messages = Errors.getMessagesFromThrowable(e);
    if (!messages.isEmpty()) {
     elements.addAll(messages);
    } else {
     addError(e);
    }
   }
  }
 }
 moduleSource = null;
}
origin: org.xbib/guice

  info.binder.install(ProviderMethodsModule.forModule(module, scanner));
} catch (RuntimeException e) {
  Collection<Message> messages = Errors.getMessagesFromThrowable(e);
origin: Nextdoor/bender

public void install(Module module) {
 if (modules.add(module)) {
  Binder binder = this;
  if (module instanceof PrivateModule) {
   binder = binder.newPrivateBinder();
  }
  try {
   module.configure(binder);
  } catch (RuntimeException e) {
   Collection<Message> messages = Errors.getMessagesFromThrowable(e);
   if (!messages.isEmpty()) {
    elements.addAll(messages);
   } else {
    addError(e);
   }
  }
  binder.install(ProviderMethodsModule.forModule(module));
 }
}
origin: com.google/inject

public void install(Module module) {
 if (modules.add(module)) {
  Binder binder = this;
  if (module instanceof PrivateModule) {
   binder = binder.newPrivateBinder();
  }
  try {
   module.configure(binder);
  } catch (RuntimeException e) {
   Collection<Message> messages = Errors.getMessagesFromThrowable(e);
   if (!messages.isEmpty()) {
    elements.addAll(messages);
   } else {
    addError(e);
   }
  }
  binder.install(ProviderMethodsModule.forModule(module));
 }
}
origin: at.bestsolution.efxclipse.eclipse/com.google.inject

public void install(Module module) {
 if (modules.add(module)) {
  Binder binder = this;
  if (module instanceof PrivateModule) {
   binder = binder.newPrivateBinder();
  }
  try {
   module.configure(binder);
  } catch (RuntimeException e) {
   Collection<Message> messages = Errors.getMessagesFromThrowable(e);
   if (!messages.isEmpty()) {
    elements.addAll(messages);
   } else {
    addError(e);
   }
  }
  binder.install(ProviderMethodsModule.forModule(module));
 }
}
origin: org.sonatype.sisu/sisu-guice

binder.install(ProviderMethodsModule.forModule(module));
origin: com.jwebmp.inject/guice

binder.install(ProviderMethodsModule.forModule(module));
origin: org.xbib/guice

binder.install(ProviderMethodsModule.forModule(module));
origin: ArcBees/Jukito

ProviderMethodsModule.forModule(this);
origin: org.jukito/jukito

ProviderMethodsModule.forModule(this);
com.google.inject.internalProviderMethodsModuleforModule

Javadoc

Returns a module which creates bindings for provider methods from the given module.

Popular methods of ProviderMethodsModule

  • forObject
  • getProviderMethods
  • <init>
  • createProviderMethod
  • getKey
  • getDelegateModule
  • overrides
    Returns true if a overrides b, assumes that the signatures match
  • getAnnotation
    Returns the annotation that is claimed by the scanner, or null if there is none.
  • isProvider
    Returns true if the method is a provider. Synthetic bridge methods are excluded. Starting with JDK 8

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • Kernel (java.awt.image)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • ImageIO (javax.imageio)
  • Top Vim 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