Class GuiceRepository

  • All Implemented Interfaces:
    java.lang.Iterable<com.google.inject.Module>

    public class GuiceRepository
    extends java.lang.Object
    implements java.lang.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 Summary

      Constructors 
      Constructor Description
      GuiceRepository​(com.google.inject.Module... modules)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.inject.Injector activate()  
      java.util.Collection<com.google.inject.Module> collection()  
      com.google.inject.Injector getInjector()  
      <T> T getInstance​(com.google.inject.Key<T> key)  
      <T> T getInstance​(java.lang.Class<T> type)  
      void install​(com.google.inject.Module module)  
      com.google.inject.Module install​(org.osgi.framework.Bundle bundle, java.lang.String moduleName)  
      void installAll​(java.lang.Iterable<? extends com.google.inject.Module> modules)  
      java.util.List<com.google.inject.Module> installAll​(org.osgi.framework.Bundle bundle, java.lang.Iterable<java.lang.String> moduleNames)  
      java.util.Iterator<com.google.inject.Module> iterator()  
      void uninstall​(com.google.inject.Module module)  
      void uninstallAll​(java.lang.Iterable<? extends com.google.inject.Module> modules)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • GuiceRepository

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

      • activate

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

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

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

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

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

        public void uninstallAll​(java.lang.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​(java.lang.Class<T> type)
      • collection

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

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