Uses of Interface
com.google.inject.Binder
-
Packages that use Binder Package Description com.google.inject Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.com.google.inject.multibindings Extension for binding multiple instances in a collection; this extension requiresguice-multibindings.jar
.com.google.inject.name Support for binding to string-based names.com.google.inject.spi Guice service provider interfacecom.google.inject.spring Spring integration; this extension requiresguice-spring.jar
.com.google.inject.testing.fieldbinder com.google.inject.throwingproviders Extension for injecting objects that may throw at provision time; this extension requiresguice-throwingproviders.jar
. -
-
Uses of Binder in com.google.inject
Subinterfaces of Binder in com.google.inject Modifier and Type Interface Description interface
PrivateBinder
Returns a binder whose configuration information is hidden from its environment by default.Methods in com.google.inject that return Binder Modifier and Type Method Description protected Binder
AbstractModule. binder()
Gets direct access to the underlyingBinder
.Binder
Binder. skipSources(Class<?>... classesToSkip)
Returns a binder that skipsclassesToSkip
when identify the calling code.Binder
Binder. withSource(Object source)
Returns a binder that usessource
as the reference location for configuration errors.Methods in com.google.inject with parameters of type Binder Modifier and Type Method Description void
AbstractModule. configure(Binder builder)
void
Module. configure(Binder binder)
Contributes bindings and other configurations for this module tobinder
.void
PrivateModule. configure(Binder binder)
-
Uses of Binder in com.google.inject.multibindings
Methods in com.google.inject.multibindings with parameters of type Binder Modifier and Type Method Description static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
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 ofkeyType
/valueType
in aMap
that is itself bound withannotation
.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 ofkeyType
/valueType
in aMap
that is itself bound withannotationType
.static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, Class<K> keyType, Class<V> valueType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
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 ofkeyType
/valueType
in aMap
that is itself bound withannotation
.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 ofkeyType
/valueType
in aMap
that is itself bound withannotationType
.static <T> OptionalBinder<T>
OptionalBinder. newOptionalBinder(Binder binder, Key<T> type)
static <T> OptionalBinder<T>
OptionalBinder. newOptionalBinder(Binder binder, TypeLiteral<T> type)
static <T> OptionalBinder<T>
OptionalBinder. newOptionalBinder(Binder binder, Class<T> type)
static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, Key<T> key)
Returns a new multibinder that collects instances of the key's type in aSet
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 oftype
in aSet
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 oftype
in aSet
that is itself bound withannotation
.static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType)
Returns a new multibinder that collects instances oftype
in aSet
that is itself bound withannotationType
.static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, Class<T> type)
Returns a new multibinder that collects instances oftype
in aSet
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 oftype
in aSet
that is itself bound withannotation
.static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, Class<T> type, Class<? extends Annotation> annotationType)
Returns a new multibinder that collects instances oftype
in aSet
that is itself bound withannotationType
. -
Uses of Binder in com.google.inject.name
Methods in com.google.inject.name with parameters of type Binder Modifier and Type Method Description static void
Names. bindProperties(Binder binder, Map<String,String> properties)
Creates a constant binding to@Named(key)
for each entry inproperties
.static void
Names. bindProperties(Binder binder, Properties properties)
Creates a constant binding to@Named(key)
for each property. -
Uses of Binder in com.google.inject.spi
Methods in com.google.inject.spi that return Binder Modifier and Type Method Description static Binder
Elements. withTrustedSource(com.google.inject.internal.GuiceInternal guiceInternal, Binder binder, Object source)
Internal version of Binder.withSource for establishing a trusted ElementSource chain for source-restricting bindings that are re-written usingElement.applyTo(com.google.inject.Binder)
.Methods in com.google.inject.spi with parameters of type Binder Modifier and Type Method Description void
DisableCircularProxiesOption. applyTo(Binder binder)
void
Element. applyTo(Binder binder)
Writes this module element to the given binder (optional operation).void
ExposedBinding. applyTo(Binder binder)
Unsupported.void
InjectionRequest. applyTo(Binder binder)
void
InterceptorBinding. applyTo(Binder binder)
void
MembersInjectorLookup. applyTo(Binder binder)
void
Message. applyTo(Binder binder)
void
ModuleAnnotatedMethodScannerBinding. applyTo(Binder binder)
void
ProviderLookup. applyTo(Binder binder)
void
ProvisionListenerBinding. applyTo(Binder binder)
void
RequireAtInjectOnConstructorsOption. applyTo(Binder binder)
void
RequireExactBindingAnnotationsOption. applyTo(Binder binder)
void
RequireExplicitBindingsOption. applyTo(Binder binder)
void
ScopeBinding. applyTo(Binder binder)
void
StaticInjectionRequest. applyTo(Binder binder)
void
TypeConverterBinding. applyTo(Binder binder)
void
TypeListenerBinding. applyTo(Binder binder)
<T> Key<T>
ModuleAnnotatedMethodScanner. prepareMethod(Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint)
Deprecated.Prefer overriding the overload that takes `Object moduleInstance` instead.<T> Key<T>
ModuleAnnotatedMethodScanner. prepareMethod(Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint, Object moduleInstance)
Prepares a method for binding.static Binder
Elements. withTrustedSource(com.google.inject.internal.GuiceInternal guiceInternal, Binder binder, Object source)
Internal version of Binder.withSource for establishing a trusted ElementSource chain for source-restricting bindings that are re-written usingElement.applyTo(com.google.inject.Binder)
. -
Uses of Binder in com.google.inject.spring
Methods in com.google.inject.spring with parameters of type Binder Modifier and Type Method Description static void
SpringIntegration. bindAll(Binder binder, org.springframework.beans.factory.ListableBeanFactory beanFactory)
Binds all Spring beans from the given factory by name. -
Uses of Binder in com.google.inject.testing.fieldbinder
Methods in com.google.inject.testing.fieldbinder with parameters of type Binder Modifier and Type Method Description void
BoundFieldModule. configure(Binder binder)
-
Uses of Binder in com.google.inject.throwingproviders
Methods in com.google.inject.throwingproviders with parameters of type Binder Modifier and Type Method Description static ThrowingProviderBinder
ThrowingProviderBinder. create(Binder binder)
-