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.
Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar
.Guice service provider interface
Extension for injecting objects that may throw at provision time; this extension requires
guice-throwingproviders.jar
.Helper methods for working with Guice.
-
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.Fields in com.google.inject declared as BinderMethods 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
private final Binder
ExposureBuilder.binder
private final Binder
RealMapBinder.binder
private final Binder
RealMultibinder.binder
private final Binder
RealOptionalBinder.binder
Methods in com.google.inject.internal with parameters of type BinderModifier and TypeMethodDescriptionprivate void
RealOptionalBinder.addDirectTypeBinding
(Binder binder) Adds a binding for T.void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
private <T> ProviderMethod<T>
ProviderMethodsModule.createProviderMethod
(Binder binder, Method method, Annotation annotation) private static ProvidesMethodScanner.AnnotationOrError
ProvidesMethodScanner.findMapKeyAnnotation
(Binder binder, Method method) private Annotation
ProviderMethodsModule.getAnnotation
(Binder binder, Method method) Returns the annotation that is claimed by the scanner, or null if there is none.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.(package private) static <K,
V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder
(Binder binder, TypeLiteral<K> keyType, Key<V> valueTypeAndAnnotation) private static <K,
V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder
(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<Map<K, V>> mapKey, RealMultibinder<Map.Entry<K, Provider<V>>> entrySetBinder) 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.<T> Key<T>
ProvidesMethodScanner.prepareMethod
(Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint) 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) private
RealMapBinder
(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<Map<K, V>> mapKey, RealMultibinder<Map.Entry<K, Provider<V>>> entrySetBinder) (package private)
RealMultibinder
(Binder binder, Key<T> key) private
RealOptionalBinder
(Binder binder, Key<T> typeKey) -
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.servlet
Fields in com.google.inject.servlet declared as BinderModifier and TypeFieldDescriptionprivate final Binder
FiltersModuleBuilder.binder
private final Binder
ServletsModuleBuilder.binder
Constructors in com.google.inject.servlet with parameters of type BinderModifierConstructorDescriptionFiltersModuleBuilder
(Binder binder) ServletsModuleBuilder
(Binder binder) -
Uses of Binder in com.google.inject.spi
Classes in com.google.inject.spi that implement BinderFields in com.google.inject.spi declared as BinderMethods 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.Constructors in com.google.inject.spi with parameters of type BinderModifierConstructorDescriptionprivate
ModuleInfo
(Binder binder, ModuleSource moduleSource, boolean skipScanning) -
Uses of Binder in com.google.inject.throwingproviders
Fields in com.google.inject.throwingproviders declared as BinderMethods in com.google.inject.throwingproviders with parameters of type BinderModifier and TypeMethodDescription(package private) void
void
static ThrowingProviderBinder
(package private) <T> CheckedProviderMethod<T>
CheckedProviderMethodsModule.createProviderMethod
(Binder binder, Method method, CheckedProvides checkedProvides) (package private) static <T> Constructor<? extends T>
CheckedProvideUtils.findThrowingConstructor
(TypeLiteral<? extends T> typeLiteral, Binder binder) (package private) List<CheckedProviderMethod<?>>
CheckedProviderMethodsModule.getProviderMethods
(Binder binder) (package private) static void
CheckedProvideUtils.validateExceptions
(Binder binder, Iterable<TypeLiteral<?>> actualExceptionTypes, Iterable<Class<? extends Throwable>> expectedExceptionTypes, Class<? extends CheckedProvider> checkedProvider) Adds errors to the binder if the exceptions aren't valid.Constructors in com.google.inject.throwingproviders with parameters of type Binder -
Uses of Binder in com.google.inject.util
Fields in com.google.inject.util declared as BinderMethods in com.google.inject.util with parameters of type BinderModifier and TypeMethodDescriptionvoid
void
void
void
void
void
Constructors in com.google.inject.util with parameters of type Binder