Package | Description |
---|---|
com.google.inject |
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.
|
com.google.inject.internal |
Guice (sounds like "juice")
|
com.google.inject.multibindings |
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar . |
com.google.inject.name |
Support for binding to string-based names.
|
com.google.inject.spi |
Guice service provider interface
|
Modifier and Type | Interface and Description |
---|---|
interface |
PrivateBinder
Returns a binder whose configuration information is hidden from its environment by default.
|
Modifier and Type | Method and Description |
---|---|
protected Binder |
AbstractModule.binder()
Gets direct access to the underlying
Binder . |
Binder |
Binder.skipSources(Class... classesToSkip)
Returns a binder that skips
classesToSkip when identify the calling code. |
Binder |
Binder.withSource(Object source)
Returns a binder that uses
source as the reference location for configuration errors. |
Modifier and Type | Method and Description |
---|---|
void |
Module.configure(Binder binder)
Contributes bindings and other configurations for this module to
binder . |
void |
AbstractModule.configure(Binder builder) |
void |
PrivateModule.configure(Binder binder) |
Modifier and Type | Field and Description |
---|---|
protected Binder |
AbstractBindingBuilder.binder |
Modifier and Type | Method and Description |
---|---|
void |
ExposedBindingImpl.applyTo(Binder binder) |
void |
PrivateElementsImpl.applyTo(Binder binder) |
void |
LinkedBindingImpl.applyTo(Binder binder) |
void |
RealOptionalBinder.configure(Binder binder) |
void |
RealMultibinder.configure(Binder binder) |
void |
ProviderMethodsModule.configure(Binder binder) |
void |
ProviderMethod.configure(Binder binder) |
void |
RealMapBinder.configure(Binder binder) |
List<ProviderMethod<?>> |
ProviderMethodsModule.getProviderMethods(Binder binder) |
static <K,V> RealMapBinder<K,V> |
RealMapBinder.newMapRealBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with no binding annotation. |
static <K,V> RealMapBinder<K,V> |
RealMapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Annotation annotation)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotation . |
static <K,V> RealMapBinder<K,V> |
RealMapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Class<? extends Annotation> annotationType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotationType . |
static <T> RealOptionalBinder<T> |
RealOptionalBinder.newRealOptionalBinder(Binder binder,
Key<T> type) |
static <T> RealMultibinder<T> |
RealMultibinder.newRealSetBinder(Binder binder,
Key<T> key)
Implementation of newSetBinder.
|
Constructor and Description |
---|
AbstractBindingBuilder(Binder binder,
List<Element> elements,
Object source,
Key<T> key) |
BindingBuilder(Binder binder,
List<Element> elements,
Object source,
Key<T> key) |
ConstantBindingBuilderImpl(Binder binder,
List<Element> elements,
Object source) |
ExposureBuilder(Binder binder,
Object source,
Key<T> key) |
Modifier and Type | Method and Description |
---|---|
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
Class<K> keyType,
Class<V> valueType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with no binding annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
Class<K> keyType,
Class<V> valueType,
Annotation annotation)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotation . |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
Class<K> keyType,
Class<V> valueType,
Class<? extends Annotation> annotationType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotationType . |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with no binding annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Annotation annotation)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotation . |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Class<? extends Annotation> annotationType)
Returns a new mapbinder that collects entries of
keyType /valueType in a Map that is itself bound with annotationType . |
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
Class<T> type) |
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
Key<T> type) |
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
TypeLiteral<T> type) |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
Class<T> type)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with no binding annotation. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
Class<T> type,
Annotation annotation)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotation . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
Class<T> type,
Class<? extends Annotation> annotationType)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotationType . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
Key<T> key)
Returns a new multibinder that collects instances of the key's type in a
Set that is
itself bound with the annotation (if any) of the key. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with no binding annotation. |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type,
Annotation annotation)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotation . |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type,
Class<? extends Annotation> annotationType)
Returns a new multibinder that collects instances of
type in a Set that is
itself bound with annotationType . |
Modifier and Type | Method and Description |
---|---|
static void |
Names.bindProperties(Binder binder,
Map<String,String> properties)
Creates a constant binding to
@Named(key) for each entry in properties . |
static void |
Names.bindProperties(Binder binder,
Properties properties)
Creates a constant binding to
@Named(key) for each property. |
Modifier and Type | Method and Description |
---|---|
void |
RequireExactBindingAnnotationsOption.applyTo(Binder binder) |
void |
InjectionRequest.applyTo(Binder binder) |
void |
Element.applyTo(Binder binder)
Writes this module element to the given binder (optional operation).
|
void |
Message.applyTo(Binder binder) |
void |
ScopeBinding.applyTo(Binder binder) |
void |
InterceptorBinding.applyTo(Binder binder) |
void |
TypeListenerBinding.applyTo(Binder binder) |
void |
DisableCircularProxiesOption.applyTo(Binder binder) |
void |
MembersInjectorLookup.applyTo(Binder binder) |
void |
TypeConverterBinding.applyTo(Binder binder) |
void |
ProvisionListenerBinding.applyTo(Binder binder) |
void |
ProviderLookup.applyTo(Binder binder) |
void |
ExposedBinding.applyTo(Binder binder)
Unsupported.
|
void |
RequireExplicitBindingsOption.applyTo(Binder binder) |
void |
StaticInjectionRequest.applyTo(Binder binder) |
void |
ModuleAnnotatedMethodScannerBinding.applyTo(Binder binder) |
void |
RequireAtInjectOnConstructorsOption.applyTo(Binder binder) |
abstract <T> Key<T> |
ModuleAnnotatedMethodScanner.prepareMethod(Binder binder,
Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint)
Prepares a method for binding.
|
Copyright © 2006–2018 Google, Inc.. All rights reserved.