Uses of Interface
com.google.inject.Binder
Packages that use Binder
Package
Description
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.
Guice (sounds like "juice")
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar
.Support for binding to string-based names.
Guice service provider interface
-
Uses of Binder in com.google.inject
Subinterfaces of Binder in com.google.injectModifier and TypeInterfaceDescriptioninterface
Returns a binder whose configuration information is hidden from its environment by default.Methods in com.google.inject that return BinderModifier and TypeMethodDescriptionprotected Binder
AbstractModule.binder()
Gets direct access to the underlyingBinder
.Binder.skipSources
(Class<?>... classesToSkip) Returns a binder that skipsclassesToSkip
when identify the calling code.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 -
Uses of Binder in com.google.inject.internal
Fields in com.google.inject.internal declared as BinderModifier and TypeFieldDescriptionprotected final Binder
AbstractBindingBuilder.binder
The binder that the new binding will be added to.Methods in com.google.inject.internal with parameters of type BinderModifier and TypeMethodDescriptionvoid
void
void
void
void
void
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 ofkeyType
/valueType
in aMap
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 ofkeyType
/valueType
in aMap
that is itself bound withannotation
.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 ofkeyType
/valueType
in aMap
that is itself bound withannotationType
.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.Constructors in com.google.inject.internal with parameters of type BinderModifierConstructorDescriptionConstantBindingBuilderImpl
(Binder binder, List<Element> elements, Object source) ExposureBuilder
(Binder binder, Object source, Key<T> key) -
Uses of Binder in com.google.inject.multibindings
Methods in com.google.inject.multibindings with parameters of type BinderModifier and TypeMethodDescriptionstatic <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 BinderModifier and TypeMethodDescriptionstatic 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 BinderModifier and TypeMethodDescriptionstatic Binder
Elements.withTrustedSource
(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 BinderModifier and TypeMethodDescriptionvoid
void
Writes this module element to the given binder (optional operation).void
Unsupported.void
void
void
void
void
void
void
void
void
void
void
void
void
void
abstract <T> Key
<T> ModuleAnnotatedMethodScanner.prepareMethod
(Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint) Prepares a method for binding.static Binder
Elements.withTrustedSource
(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)
.