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.internal Guice (sounds like "juice")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.servlet Servlet API scopes, bindings and registration; this extension requiresguice-servlet.jar
.com.google.inject.spi Guice service provider interfacecom.google.inject.throwingproviders Extension for injecting objects that may throw at provision time; this extension requiresguice-throwingproviders.jar
.com.google.inject.util Helper methods for working with Guice. -
-
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.Fields in com.google.inject declared as Binder Modifier and Type Field Description (package private) Binder
AbstractModule. binder
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(java.lang.Class<?>... classesToSkip)
Returns a binder that skipsclassesToSkip
when identify the calling code.Binder
Binder. withSource(java.lang.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.internal
Fields in com.google.inject.internal declared as Binder Modifier and Type Field Description protected Binder
AbstractBindingBuilder. binder
The binder that the new binding will be added to.private Binder
ExposureBuilder. binder
private Binder
RealMapBinder. binder
private Binder
RealMultibinder. binder
private Binder
RealOptionalBinder. binder
Methods in com.google.inject.internal with parameters of type Binder Modifier and Type Method Description private void
RealOptionalBinder. addDirectTypeBinding(Binder binder)
Adds a binding for T.void
ConstructorBindingImpl. applyTo(Binder binder)
void
ExposedBindingImpl. applyTo(Binder binder)
void
InjectorImpl.ConvertedConstantBindingImpl. applyTo(Binder binder)
void
InjectorImpl.SyntheticProviderBindingImpl. applyTo(Binder binder)
void
InstanceBindingImpl. applyTo(Binder binder)
void
LinkedBindingImpl. applyTo(Binder binder)
void
LinkedProviderBindingImpl. applyTo(Binder binder)
void
PrivateElementsImpl. applyTo(Binder binder)
void
ProviderInstanceBindingImpl. applyTo(Binder binder)
void
UntargettedBindingImpl. applyTo(Binder binder)
void
InjectorShell.InheritedScannersModule. configure(Binder binder)
void
InjectorShell.RootModule. configure(Binder binder)
void
ProviderMethod. configure(Binder binder)
void
ProviderMethodsModule. configure(Binder binder)
void
RealMapBinder. configure(Binder binder)
void
RealMapBinder.MultimapBinder. configure(Binder binder)
void
RealMultibinder. configure(Binder binder)
void
RealOptionalBinder. configure(Binder binder)
private <T> ProviderMethod<T>
ProviderMethodsModule. createProviderMethod(Binder binder, java.lang.reflect.Method method, java.lang.annotation.Annotation annotation)
private static ProvidesMethodScanner.AnnotationOrError
ProvidesMethodScanner. findMapKeyAnnotation(Binder binder, java.lang.reflect.Method method)
private java.lang.annotation.Annotation
ProviderMethodsModule. getAnnotation(Binder binder, java.lang.reflect.Method method)
Returns the annotation that is claimed by the scanner, or null if there is none.java.util.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<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
static <K,V>
RealMapBinder<K,V>RealMapBinder. newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, java.lang.annotation.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, java.lang.Class<? extends java.lang.annotation.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, java.lang.annotation.Annotation annotation, Key<T> key, InjectionPoint injectionPoint)
Constructors in com.google.inject.internal with parameters of type Binder Constructor Description AbstractBindingBuilder(Binder binder, java.util.List<Element> elements, java.lang.Object source, Key<T> key)
BindingBuilder(Binder binder, java.util.List<Element> elements, java.lang.Object source, Key<T> key)
ConstantBindingBuilderImpl(Binder binder, java.util.List<Element> elements, java.lang.Object source)
ExposureBuilder(Binder binder, java.lang.Object source, Key<T> key)
RealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
RealMultibinder(Binder binder, Key<T> key)
RealOptionalBinder(Binder binder, Key<T> typeKey)
-
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, java.lang.annotation.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, java.lang.Class<? extends java.lang.annotation.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, java.lang.Class<K> keyType, java.lang.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, java.lang.Class<K> keyType, java.lang.Class<V> valueType, java.lang.annotation.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, java.lang.Class<K> keyType, java.lang.Class<V> valueType, java.lang.Class<? extends java.lang.annotation.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, java.lang.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, java.lang.annotation.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, java.lang.Class<? extends java.lang.annotation.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, java.lang.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, java.lang.Class<T> type, java.lang.annotation.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, java.lang.Class<T> type, java.lang.Class<? extends java.lang.annotation.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, java.util.Map<java.lang.String,java.lang.String> properties)
Creates a constant binding to@Named(key)
for each entry inproperties
.static void
Names. bindProperties(Binder binder, java.util.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 Binder Modifier and Type Field Description private Binder
FiltersModuleBuilder. binder
private Binder
ServletsModuleBuilder. binder
Constructors in com.google.inject.servlet with parameters of type Binder Constructor Description FiltersModuleBuilder(Binder binder)
ServletsModuleBuilder(Binder binder)
-
Uses of Binder in com.google.inject.spi
Classes in com.google.inject.spi that implement Binder Modifier and Type Class Description private static class
Elements.RecordingBinder
Methods in com.google.inject.spi that return Binder Modifier and Type Method Description static Binder
Elements. withTrustedSource(GuiceInternal guiceInternal, Binder binder, java.lang.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)
void
Elements.ElementsAsModule. configure(Binder binder)
abstract <T> Key<T>
ModuleAnnotatedMethodScanner. prepareMethod(Binder binder, java.lang.annotation.Annotation annotation, Key<T> key, InjectionPoint injectionPoint)
Prepares a method for binding.static Binder
Elements. withTrustedSource(GuiceInternal guiceInternal, Binder binder, java.lang.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.throwingproviders
Fields in com.google.inject.throwingproviders declared as Binder Modifier and Type Field Description private Binder
ThrowingProviderBinder. binder
Methods in com.google.inject.throwingproviders with parameters of type Binder Modifier and Type Method Description (package private) void
CheckedProviderMethod. configure(Binder binder)
void
CheckedProviderMethodsModule. configure(Binder binder)
static ThrowingProviderBinder
ThrowingProviderBinder. create(Binder binder)
(package private) <T> CheckedProviderMethod<T>
CheckedProviderMethodsModule. createProviderMethod(Binder binder, java.lang.reflect.Method method, CheckedProvides checkedProvides)
(package private) static <T> java.lang.reflect.Constructor<? extends T>
CheckedProvideUtils. findThrowingConstructor(TypeLiteral<? extends T> typeLiteral, Binder binder)
(package private) java.util.List<CheckedProviderMethod<?>>
CheckedProviderMethodsModule. getProviderMethods(Binder binder)
(package private) static void
CheckedProvideUtils. validateExceptions(Binder binder, java.lang.Iterable<TypeLiteral<?>> actualExceptionTypes, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> expectedExceptionTypes, java.lang.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 Constructor Description ThrowingProviderBinder(Binder binder)
-
Uses of Binder in com.google.inject.util
Fields in com.google.inject.util declared as Binder Modifier and Type Field Description protected Binder
Modules.ModuleWriter. binder
Methods in com.google.inject.util with parameters of type Binder Modifier and Type Method Description void
Modules.CombinedModule. configure(Binder binder)
void
Modules.DisableCircularProxiesModule. configure(Binder binder)
void
Modules.EmptyModule. configure(Binder binder)
void
Modules.RequireAtInjectOnConstructorsModule. configure(Binder binder)
void
Modules.RequireExactBindingAnnotationsModule. configure(Binder binder)
void
Modules.RequireExplicitBindingsModule. configure(Binder binder)
Constructors in com.google.inject.util with parameters of type Binder Constructor Description ModuleWriter(Binder binder)
-