Package com.yahoo.jdisc.application
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 ofModule
s. An instance of this class is owned by theContainerBuilder
, and is used to configure the set of Modules that eventually form theInjector
of the activeContainer
.- 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()
Collection<com.google.inject.Module>
collection()
com.google.inject.Injector
getInjector()
<T> T
getInstance(com.google.inject.Key<T> key)
<T> T
getInstance(Class<T> type)
void
install(com.google.inject.Module module)
com.google.inject.Module
install(org.osgi.framework.Bundle bundle, String moduleName)
void
installAll(Iterable<? extends com.google.inject.Module> modules)
List<com.google.inject.Module>
installAll(org.osgi.framework.Bundle bundle, Iterable<String> moduleNames)
Iterator<com.google.inject.Module>
iterator()
void
uninstall(com.google.inject.Module module)
void
uninstallAll(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
-
-
-
-
Method Detail
-
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 void installAll(Iterable<? extends com.google.inject.Module> modules)
-
install
public 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()
-
-