Class GuiceRepository

java.lang.Object
com.yahoo.jdisc.application.GuiceRepository
All Implemented Interfaces:
Iterable<com.google.inject.Module>

public class GuiceRepository extends Object implements Iterable<com.google.inject.Module>
This is a repository of Modules. An instance of this class is owned by the ContainerBuilder, and is used to configure the set of Modules that eventually form the Injector of the active Container.
Author:
Simon Thoresen Hult
  • Constructor Details

    • GuiceRepository

      public GuiceRepository(com.google.inject.Module... modules)
  • Method Details

    • activate

      public com.google.inject.Injector activate()
    • installAll

      public List<com.google.inject.Module> installAll(org.osgi.framework.Bundle bundle, Iterable<String> moduleNames) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • install

      public com.google.inject.Module install(org.osgi.framework.Bundle bundle, String moduleName) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • installAll

      public final void installAll(Iterable<? extends com.google.inject.Module> modules)
    • install

      public final void install(com.google.inject.Module module)
    • uninstallAll

      public void uninstallAll(Iterable<? extends com.google.inject.Module> modules)
    • uninstall

      public void uninstall(com.google.inject.Module module)
    • getInjector

      public com.google.inject.Injector getInjector()
    • getInstance

      public <T> T getInstance(com.google.inject.Key<T> key)
    • getInstance

      public <T> T getInstance(Class<T> type)
    • collection

      public Collection<com.google.inject.Module> collection()
    • iterator

      public Iterator<com.google.inject.Module> iterator()
      Specified by:
      iterator in interface Iterable<com.google.inject.Module>