Uses of Interface
com.google.inject.Binding
-
Packages that use Binding Package Description com.google.inject Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.com.google.inject.grapher com.google.inject.multibindings Extension for binding multiple instances in a collection; this extension requiresguice-multibindings.jar
.com.google.inject.servlet Servlet API scopes, bindings and registration; this extension requiresguice-servlet.jar
.com.google.inject.spi Guice service provider interface -
-
Uses of Binding in com.google.inject
Methods in com.google.inject that return Binding Modifier and Type Method Description <T> Binding<T>
Injector. getBinding(Key<T> key)
Returns the binding for the given injection key.<T> Binding<T>
Injector. getBinding(Class<T> type)
Returns the binding for the given type.<T> Binding<T>
Injector. getExistingBinding(Key<T> key)
Returns the binding if it already exists, or null if does not exist.Methods in com.google.inject that return types with arguments of type Binding Modifier and Type Method Description <T> List<Binding<T>>
Injector. findBindingsByType(TypeLiteral<T> type)
Returns all explicit bindings fortype
.Map<Key<?>,Binding<?>>
Injector. getAllBindings()
Returns a snapshot of this injector's bindings, both explicit and just-in-time.Map<Key<?>,Binding<?>>
Injector. getBindings()
Returns this injector's explicit bindings.Methods in com.google.inject with parameters of type Binding Modifier and Type Method Description static boolean
Scopes. isScoped(Binding<?> binding, Scope scope, Class<? extends Annotation> scopeAnnotation)
Returns true ifbinding
has the given scope.static boolean
Scopes. isSingleton(Binding<?> binding)
Returns true ifbinding
is singleton-scoped.Method parameters in com.google.inject with type arguments of type Binding Modifier and Type Method Description protected void
AbstractModule. bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listener)
void
Binder. bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners)
Registers listeners for provisioned objects.protected void
PrivateModule. bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners)
-
Uses of Binding in com.google.inject.grapher
Methods in com.google.inject.grapher with parameters of type Binding Modifier and Type Method Description Collection<Key<?>>
TransitiveDependencyVisitor. visitOther(Binding<?> binding)
Method parameters in com.google.inject.grapher with type arguments of type Binding Modifier and Type Method Description Iterable<Alias>
AliasCreator. createAliases(Iterable<Binding<?>> bindings)
Returns aliases for the given dependency graph.Iterable<Edge>
EdgeCreator. getEdges(Iterable<Binding<?>> bindings)
Returns edges for the given dependency graph.Iterable<Node>
NodeCreator. getNodes(Iterable<Binding<?>> bindings)
Returns nodes for the given dependency graph. -
Uses of Binding in com.google.inject.multibindings
Methods in com.google.inject.multibindings that return Binding Modifier and Type Method Description Binding<?>
OptionalBinderBinding. getActualBinding()
Returns the actual binding (set byOptionalBinder.setBinding()
) or null if not set.Binding<?>
OptionalBinderBinding. getDefaultBinding()
Returns the default binding (set byOptionalBinder.setDefault()
) if one exists or null if no default binding is set.Methods in com.google.inject.multibindings that return types with arguments of type Binding Modifier and Type Method Description List<Binding<?>>
MultibinderBinding. getElements()
Returns all bindings that make up the set.List<Map.Entry<?,Binding<?>>>
MapBinderBinding. getEntries()
Returns all entries in the Map.List<Map.Entry<?,Binding<?>>>
MapBinderBinding. getEntries(Iterable<? extends Element> elements)
Similar toMapBinderBinding.getEntries()
, but can be used on a MapBinderBinding retrieved fromElements.getElements(com.google.inject.Module...)
. -
Uses of Binding in com.google.inject.servlet
Methods in com.google.inject.servlet with parameters of type Binding Modifier and Type Method Description static boolean
ServletScopes. isRequestScoped(Binding<?> binding)
Returns true ifbinding
is request-scoped. -
Uses of Binding in com.google.inject.spi
Subinterfaces of Binding in com.google.inject.spi Modifier and Type Interface Description interface
ConstructorBinding<T>
A binding to the constructor of a concrete class.interface
ConvertedConstantBinding<T>
A binding created from converting a bound instance to a new type.interface
ExposedBinding<T>
A binding to a key exposed from an enclosed private environment.interface
InstanceBinding<T>
A binding to a single instance.interface
LinkedKeyBinding<T>
A binding to a linked key.interface
ProviderBinding<T extends Provider<?>>
A binding to aProvider
that delegates to the binding for the provided type.interface
ProviderInstanceBinding<T>
A binding to a provider instance.interface
ProviderKeyBinding<T>
A binding to a provider key.interface
UntargettedBinding<T>
An untargetted binding.Methods in com.google.inject.spi that return Binding Modifier and Type Method Description abstract Binding<T>
ProvisionListener.ProvisionInvocation. getBinding()
Returns the Binding this is provisioning.Methods in com.google.inject.spi that return types with arguments of type Binding Modifier and Type Method Description Matcher<? super Binding<?>>
ProvisionListenerBinding. getBindingMatcher()
Returns the binding matcher which chooses which bindings the listener should be notified of.Methods in com.google.inject.spi with parameters of type Binding Modifier and Type Method Description <T> V
DefaultElementVisitor. visit(Binding<T> binding)
<T> V
ElementVisitor. visit(Binding<T> binding)
Visit a mapping from a key (type and optional annotation) to the strategy for getting instances of the type.protected V
DefaultBindingTargetVisitor. visitOther(Binding<? extends T> binding)
Default visit implementation.
-