com.google.inject |
Google Guice (pronounced "juice") is an ultra-lightweight dependency
injection framework. |
Java Source File Name | Type | Comment |
AbstractErrorHandler.java | Class | Implements formatting. |
AbstractModule.java | Class | A support class for
Module s which reduces repetition and results in
a more readable configuration. |
AllTests.java | Class | |
Binder.java | Interface | Collects configuration information (primarily bindings) which will be
used to create an
Injector . |
BinderImpl.java | Class | Builds a dependency injection
Injector . |
Binding.java | Interface | A mapping from a key (type and optional annotation) to a provider of
instances of that type. |
BindingAnnotation.java | Annotation | Annotates annotations which are used for binding. |
BindingAnnotationTest.java | Class | |
BindingBuilderImpl.java | Class | Binds a
com.google.inject.Key to an implementation in a given scope. |
BindingBuilderTest.java | Class | |
BindingImpl.java | Class | |
BoundInstanceInjectionTest.java | Class | |
BoundProviderFactory.java | Class | Delegates to a custom factory which is also bound in the injector. |
BoundProviderTest.java | Class | |
CircularDependencyTest.java | Class | |
ConfigurationException.java | Class | Thrown when the
BinderImpl is misconfigured. |
ConstantBindingBuilderImpl.java | Class | Builds a constant binding. |
ConstantConversionException.java | Class | Thrown when a constant type conversion error occurs. |
ConstantConversionTest.java | Class | |
ConstantFactory.java | Class | |
ConstructionContext.java | Class | Context of a dependency construction. |
ConstructionProxy.java | Interface | Proxies calls to a
java.lang.reflect.Constructor for a class
T . |
ConstructionProxyFactory.java | Interface | Creates
ConstructionProxy instances. |
ConstructorInjector.java | Class | Injects constructors. |
Context.java | Interface | Context of the current injection. |
ContextualCallable.java | Interface | |
CreationException.java | Class | Thrown when errors occur while creating a
Injector . |
DefaultConstructionProxyFactory.java | Class | Default
ConstructionProxyFactory implementation. |
ErrorHandler.java | Interface | Handles errors in the Injector. |
ErrorHandlingTest.java | Class | |
ErrorMessages.java | Class | Error message templates. |
ExternalContext.java | Class | An immutable snapshot of the current context which is safe to expose to
client code. |
GenericInjectionTest.java | Class | |
Guice.java | Class | The entry point to the Guice framework. |
ImplementedBy.java | Annotation | A pointer to the default implementation of a type. |
ImplicitBindingTest.java | Class | |
Inject.java | Annotation | Annotates members of your implementation class (constructors, methods
and fields) into which the
Injector should inject values.
The Injector fulfills injection requests for:
- Every instance it constructs.
|
Injector.java | Interface | Fulfills requests for the object instances that make up your application,
always ensuring that these instances are properly injected before they are
returned. |
InjectorImpl.java | Class | Default
Injector implementation. |
InjectorTest.java | Class | |
IntegrationTest.java | Class | |
InterceptorStackCallback.java | Class | Intercepts a method with a stack of interceptors. |
InternalContext.java | Class | Internal context. |
InternalFactory.java | Interface | Creates objects which will be injected. |
InternalFactoryToProviderAdapter.java | Class | |
InvalidErrorHandler.java | Class | |
Key.java | Class | Binding key consisting of an injection type and an optional annotation. |
KeyTest.java | Class | |
MethodAspect.java | Class | Ties a matcher to a method interceptor. |
Module.java | Interface | A module contributes configuration information, typically interface
bindings, which will be used to create an
Injector . |
NotRequiredTest.java | Class | |
package-info.java | | |
PerformanceComparison.java | Class | A semi-useless microbenchmark. |
PreloadingTest.java | Class | |
ProvidedBy.java | Annotation | A pointer to the default provider type for a type. |
Provider.java | Interface | Simply, any object capable of providing instances of type
T .
Providers are used in numerous ways by the Guice framework:
- When the default means for obtaining instances (an injectable or
parameterless constructor) is insufficient for a particular binding, the
module can specify a custom
Provider instead, to control exactly how
Guice creates or obtains instances for the binding.
- An implementation class may always choose to have a
Provider instance injected, rather than having a
T injected directly.
|
ProviderInjectionTest.java | Class | |
ProviderToInternalFactoryAdapter.java | Class | |
ProvisionException.java | Class | Used to rethrow exceptions that occur while providing instances, to add
additional contextual details. |
ProxyFactory.java | Class | Proxies classes applying interceptors to methods as specified in
ProxyFactoryBuilder . |
ProxyFactoryBuilder.java | Class | Creates a
ProxyFactory . |
ProxyFactoryTest.java | Class | |
ReflectionTest.java | Class | |
Scope.java | Interface | A scope is a level of visibility that instances provided by Guice may have.
By default, an instance created by the
Injector has no
scope, meaning it has no state from the framework's perspective -- the
Injector creates it, injects it once into the class that required it,
and then immediately forgets it. |
ScopeAnnotation.java | Annotation | Annotates annotations which are used for scoping. |
Scopes.java | Class | Built in scope implementations. |
ScopesTest.java | Class | |
Singleton.java | Annotation | Apply this to implementation classes when you want only one instance
(per
Injector ) to be reused for all injections for that binding. |
Stage.java | enum | The stage we're running in. |
StaticInjectionTest.java | Class | |
SuperclassTest.java | Class | |
TypeLiteral.java | Class | |
TypeLiteralTest.java | Class | |
TypeWithArgument.java | Class | |