|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
Container | Injects dependencies into constructors, methods and fields annotated with
@Inject . |
Context | Context of the current injection. |
ContextualFactory<T> | Gets instances of T . |
Factory<T> | Gets instances of T . |
Module | A module contributes a set of configurations, typically interface bindings,
to a ContainerBuilder which will later create a Container . |
Scope | A scope which bound objects can reside in. |
Class Summary | |
---|---|
AbstractModule | A support class for Modules which reduces repetition and
results in a more readable configuration. |
Binding<T> | A binding from a Key (type and name) to an implementation. |
ContainerBuilder | Builds a dependency injection Container . |
Key<T> | Binding key consisting of a type and a name. |
Scopes | Built in scope implementations. |
TypeLiteral<T> | Represents a generic type T . |
Exception Summary | |
---|---|
ContainerCreationException | Thrown when errors occur while creating a Container . |
Annotation Types Summary | |
---|---|
ContainerScoped | Apply this to implementation classes when you want one instance per container, as opposed to one instance per injection. |
Inject | Annotates members and parameters which should have their value[s] injected. |
Scoped | Annotates an implementation class with the name of its scope. |
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection container. Please refer to the Guice User's Guide for a gentle introduction.
The principal public APIs in this package are:
Inject
Module
ContainerBuilder
Module
to collect these bindings.
Factory
and
ContextualFactory
Context
is made available to the
factory.
Container
ContainerBuilder
after each of your
Modules
has been allowed to contribute
its bindings. In most cases you will never need to interact directly
with the container -- which is the main distinguishing feature of the
Dependency Injection pattern from its rival, Service Locator.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |