Package | Description |
---|---|
com.google.inject |
Google Guice (pronounced "juice") is an ultra-lightweight dependency
injection framework.
|
com.google.inject.assistedinject |
Extension for combining factory interfaces with injection; this extension requires
guice-assistedinject.jar . |
com.google.inject.grapher | |
com.google.inject.internal |
Guice (sounds like like "juice")
|
com.google.inject.multibindings |
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar . |
com.google.inject.servlet |
Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar . |
com.google.inject.spi |
Guice service provider interface
|
com.google.inject.tools.jmx |
JMX integration; this extension requires
guice-jmx.jar . |
com.google.inject.util |
Helper methods for working with Guice.
|
Modifier and Type | Method and Description |
---|---|
Injector |
Injector.createChildInjector(java.lang.Iterable<? extends Module> modules)
Returns a new injector that inherits all state from this injector.
|
Injector |
Injector.createChildInjector(Module... modules)
Returns a new injector that inherits all state from this injector.
|
static Injector |
Guice.createInjector(java.lang.Iterable<? extends Module> modules)
Creates an injector for the given set of modules.
|
static Injector |
Guice.createInjector(Module... modules)
Creates an injector for the given set of modules.
|
static Injector |
Guice.createInjector(Stage stage,
java.lang.Iterable<? extends Module> modules)
Creates an injector for the given set of modules, in a given development
stage.
|
static Injector |
Guice.createInjector(Stage stage,
Module... modules)
Creates an injector for the given set of modules, in a given development
stage.
|
Injector |
Injector.getParent()
Returns this injector's parent, or
null if this is a top-level injector. |
Modifier and Type | Field and Description |
---|---|
private Injector |
FactoryProvider.injector
Deprecated.
|
private Injector |
FactoryProvider2.injector
the hosting injector, or null if we haven't been initialized yet
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
Parameter.getValue(Injector injector)
Returns the Guice
Key for this parameter. |
(package private) void |
FactoryProvider2.initialize(Injector injector)
At injector-creation time, we initialize the invocation handler.
|
boolean |
Parameter.isBound(Injector injector) |
private boolean |
Parameter.isBound(Injector injector,
Key<?> key) |
private boolean |
FactoryProvider.paramCanBeInjected(Parameter parameter,
Injector injector)
Deprecated.
|
(package private) void |
FactoryProvider.setInjectorAndCheckUnboundParametersAreInjectable(Injector injector)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.Iterable<Binding<?>> |
AbstractInjectorGrapher.getBindings(Injector injector,
java.util.Set<Key<?>> root)
Returns the bindings for the root keys and their transitive dependencies.
|
java.util.Set<Key<?>> |
DefaultRootKeySetCreator.getRootKeys(Injector injector) |
java.util.Set<Key<?>> |
RootKeySetCreator.getRootKeys(Injector injector)
Returns the set of starting keys to graph.
|
void |
AbstractInjectorGrapher.graph(Injector injector) |
void |
InjectorGrapher.graph(Injector injector)
Graphs the guice dependency graph for the given injector using default starting keys.
|
void |
AbstractInjectorGrapher.graph(Injector injector,
java.util.Set<Key<?>> root) |
void |
InjectorGrapher.graph(Injector injector,
java.util.Set<Key<?>> root)
Graphs the guice dependency graph for the given injector using the given starting keys and
their transitive dependencies.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
InjectorImpl
Default
Injector implementation. |
(package private) static class |
InternalInjectorCreator.ToolStageInjector
Injector exposed to users in Stage.TOOL . |
Modifier and Type | Field and Description |
---|---|
private Injector |
InternalInjectorCreator.ToolStageInjector.delegateInjector |
private Injector |
InjectorShell.InjectorFactory.injector |
private Injector |
PrivateElementsImpl.injector |
Modifier and Type | Method and Description |
---|---|
Injector |
InternalInjectorCreator.build() |
Injector |
InjectorImpl.createChildInjector(java.lang.Iterable<? extends Module> modules) |
Injector |
InternalInjectorCreator.ToolStageInjector.createChildInjector(java.lang.Iterable<? extends Module> modules) |
Injector |
InjectorImpl.createChildInjector(Module... modules) |
Injector |
InternalInjectorCreator.ToolStageInjector.createChildInjector(Module... modules) |
Injector |
InjectorShell.InjectorFactory.get() |
Injector |
InjectorShell.InjectorFactory.get(Errors errors,
InternalContext context,
Dependency<?> dependency,
boolean linked) |
Injector |
PrivateElementsImpl.getInjector() |
Injector |
InjectorImpl.getParent() |
Injector |
InternalInjectorCreator.ToolStageInjector.getParent() |
private Injector |
InternalInjectorCreator.primaryInjector()
Returns the injector being constructed.
|
Modifier and Type | Method and Description |
---|---|
void |
PrivateElementsImpl.initInjector(Injector injector) |
Constructor and Description |
---|
InjectorFactory(Injector injector) |
ToolStageInjector(Injector delegateInjector) |
Modifier and Type | Field and Description |
---|---|
(package private) Injector |
Indexer.injector |
Modifier and Type | Method and Description |
---|---|
(package private) void |
MapBinder.RealMapBinder.RealProviderMapProvider.initialize(Injector injector) |
(package private) void |
MapBinder.RealMapBinder.MultimapBinder.RealProviderMultimapProvider.initialize(Injector injector) |
(package private) void |
Multibinder.RealMultibinder.initialize(Injector injector)
Invoked by Guice at Injector-creation time to prepare providers for each
element in this set.
|
(package private) void |
OptionalBinder.RealOptionalBinder.RealOptionalProviderProvider.initialize(Injector injector) |
(package private) boolean |
Multibinder.RealMultibinder.permitsDuplicates(Injector injector) |
Constructor and Description |
---|
Indexer(Injector injector) |
Modifier and Type | Field and Description |
---|---|
private Injector |
ManagedFilterPipeline.injector |
Modifier and Type | Method and Description |
---|---|
protected abstract Injector |
GuiceServletContextListener.getInjector()
Override this method to create (or otherwise obtain a reference to) your
injector.
|
Modifier and Type | Method and Description |
---|---|
private FilterDefinition[] |
ManagedFilterPipeline.collectFilterDefinitions(Injector injector)
Introspects the injector and collects all instances of bound
List<FilterDefinition>
into a master list. |
private ServletDefinition[] |
ManagedServletPipeline.collectServletDefinitions(Injector injector)
Introspects the injector and collects all instances of bound
List<ServletDefinition>
into a master list. |
void |
ManagedServletPipeline.init(javax.servlet.ServletContext servletContext,
Injector injector) |
void |
FilterDefinition.init(javax.servlet.ServletContext servletContext,
Injector injector,
java.util.Set<javax.servlet.Filter> initializedSoFar) |
void |
ServletDefinition.init(javax.servlet.ServletContext servletContext,
Injector injector,
java.util.Set<javax.servlet.http.HttpServlet> initializedSoFar) |
Constructor and Description |
---|
ManagedFilterPipeline(Injector injector,
ManagedServletPipeline servletPipeline,
Provider<javax.servlet.ServletContext> servletContext) |
ManagedServletPipeline(Injector injector) |
Modifier and Type | Method and Description |
---|---|
Injector |
PrivateElements.getInjector()
Returns the child injector that hosts these private elements, or null if the elements haven't
been used to create an injector.
|
Modifier and Type | Method and Description |
---|---|
static void |
Manager.manage(javax.management.MBeanServer server,
java.lang.String domain,
Injector injector)
Registers all the bindings of an Injector with the given MBean server.
|
static void |
Manager.manage(java.lang.String domain,
Injector injector)
Registers all the bindings of an Injector with the platform MBean server.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
Providers.GuicifiedProviderWithDependencies.initialize(Injector injector) |