Uses of Interface
com.google.inject.Binding
Packages that use Binding
Package
Description
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.
Extension for combining factory interfaces with injection; this extension requires
guice-assistedinject.jar.Guice (sounds like "juice")
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar.Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar.Guice service provider interface
JMX integration; this extension requires
guice-jmx.jar.Helper methods for working with Guice.
-
Uses of Binding in com.google.inject
Methods in com.google.inject that return BindingModifier and TypeMethodDescription<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 BindingModifier and TypeMethodDescriptionInjector.findBindingsByType(TypeLiteral<T> type) Returns all explicit bindings fortype.Injector.getAllBindings()Returns a snapshot of this injector's bindings, both explicit and just-in-time.Injector.getBindings()Returns this injector's explicit bindings.Methods in com.google.inject with parameters of type BindingModifier and TypeMethodDescriptionstatic booleanScopes.isScoped(Binding<?> binding, Scope scope, Class<? extends Annotation> scopeAnnotation) Returns true ifbindinghas the given scope.static booleanScopes.isSingleton(Binding<?> binding) Returns true ifbindingis singleton-scoped.Method parameters in com.google.inject with type arguments of type BindingModifier and TypeMethodDescriptionprotected voidAbstractModule.bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listener) voidBinder.bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners) Registers listeners for provisioned objects.protected voidPrivateModule.bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners) -
Uses of Binding in com.google.inject.assistedinject
Fields in com.google.inject.assistedinject declared as BindingModifier and TypeFieldDescription(package private) Binding<?> FactoryProvider2.AssistData.cachedBindingused to perform optimized factory creations.Methods in com.google.inject.assistedinject that return BindingModifier and TypeMethodDescriptionBinding<?> FactoryProvider2.getBindingFromNewInjector(Method method, Object[] args, FactoryProvider2.AssistData data) Creates a child injector that binds the args, and returns the binding for the method's result. -
Uses of Binding in com.google.inject.grapher
Methods in com.google.inject.grapher with type parameters of type BindingModifier and TypeMethodDescriptionprivate <T extends Binding<?> & HasDependencies>
Collection<Edge> DefaultEdgeCreator.EdgeVisitor.newDependencyEdges(NodeId nodeId, T binding) Returns a dependency edge for eachDependencyin the binding.private <T extends Binding<?> & HasDependencies>
InstanceNodeDefaultNodeCreator.NodeVisitor.newInstanceNode(T binding, Object instance) Returns a new instance node for the givenBinding.Methods in com.google.inject.grapher that return types with arguments of type BindingModifier and TypeMethodDescriptionAbstractInjectorGrapher.getBindings(Injector injector, Set<Key<?>> root) Returns the bindings for the root keys and their transitive dependencies.Methods in com.google.inject.grapher with parameters of type BindingModifier and TypeMethodDescriptionprivate ImplementationNodeDefaultNodeCreator.NodeVisitor.newImplementationNode(Binding<?> binding, Collection<Member> members) Returns a new implementation node for the given binding.private InterfaceNodeDefaultNodeCreator.NodeVisitor.newInterfaceNode(Binding<?> binding) Returns a new interface node for the givenBinding.DefaultEdgeCreator.EdgeVisitor.visitOther(Binding<?> binding) DefaultNodeCreator.NodeVisitor.visitOther(Binding<?> binding) Collection<Key<?>> TransitiveDependencyVisitor.visitOther(Binding<?> binding) Method parameters in com.google.inject.grapher with type arguments of type BindingModifier and TypeMethodDescriptionAliasCreator.createAliases(Iterable<Binding<?>> bindings) Returns aliases for the given dependency graph.ProviderAliasCreator.createAliases(Iterable<Binding<?>> bindings) Returns edges for the given dependency graph.Returns nodes for the given dependency graph. -
Uses of Binding in com.google.inject.internal
Classes in com.google.inject.internal that implement BindingModifier and TypeClassDescriptionclassBindingImpl<T>(package private) final class(package private) final classprivate static classprivate static classA framework-created JIT Providerbinding. (package private) final class(package private) final classAProviderInstanceBindingImplfor implementing 'native' guice extensions.(package private) final class(package private) final class(package private) class(package private) final classFields in com.google.inject.internal declared as BindingModifier and TypeFieldDescriptionprivate final Binding<?> BindingAlreadySetError.bindingDuplicateElementError.Element.binding(package private) final Binding<?> ProvisionListenerCallbackStore.KeyBinding.bindingProvisionListenerStackCallback.bindingRealMapBinder.MultimapBinder.RealMultimapProvider.PerKeyData.bindingsprivate final Binding<?> BindingAlreadySetError.originalInjectorImpl.ConvertedConstantBindingImpl.originalBindingFields in com.google.inject.internal with type parameters of type BindingModifier and TypeFieldDescriptionRealMultibinder.BindingSelection.bindingsRealMultibinder.RealMultibinderProvider.bindingsDuplicateMapKeyError.duplicatesRealMapBinder.BindingSelection.entriesInjectorBindingData.explicitBindingsInjectorBindingData.explicitBindingsMutableprivate final com.google.common.collect.ListMultimap<TypeLiteral<?>, Binding<?>> InjectorBindingData.indexedExplicitBindingsRealMapBinder.BindingSelection.mapBindingsThese are built during initialization and used by all factories to actually provide the relevant maps.RealMapBinder.BindingSelection.multimapBindingsMethods in com.google.inject.internal that return BindingModifier and TypeMethodDescriptionBinding<?> RealOptionalBinder.JavaOptionalProvider.getActualBinding()Binding<?> RealOptionalBinder.RealOptionalKeyProvider.getActualBinding()<T> Binding<T> InjectorImpl.getBinding(Class<T> type) <T> Binding<T> InternalInjectorCreator.ToolStageInjector.getBinding(Key<T> key) <T> Binding<T> InternalInjectorCreator.ToolStageInjector.getBinding(Class<T> type) ProvisionListenerStackCallback.Provision.getBinding()Binding<?> RealOptionalBinder.JavaOptionalProvider.getDefaultBinding()Binding<?> RealOptionalBinder.RealOptionalKeyProvider.getDefaultBinding()<T> Binding<T> InternalInjectorCreator.ToolStageInjector.getExistingBinding(Key<T> key) Methods in com.google.inject.internal that return types with arguments of type BindingModifier and TypeMethodDescriptionInjectorImpl.findBindingsByType(TypeLiteral<T> type) InternalInjectorCreator.ToolStageInjector.findBindingsByType(TypeLiteral<T> type) InjectorImpl.getAllBindings()InternalInjectorCreator.ToolStageInjector.getAllBindings()InjectorImpl.getBindings()InternalInjectorCreator.ToolStageInjector.getBindings()RealMultibinder.BindingSelection.getBindings()RealMultibinder.BindingSelection.getElements()RealMultibinder.ExtensionRealMultibinderProvider.getElements()RealMapBinder.BindingSelection.getEntries()RealMapBinder.ExtensionRealMapProvider.getEntries()RealMapBinder.ExtensionRealMapProvider.getEntries(Iterable<? extends Element> elements) InjectorBindingData.getExplicitBindingsThisLevel()com.google.common.collect.ListMultimap<TypeLiteral<?>, Binding<?>> InjectorBindingData.getIndexedExplicitBindings()RealMapBinder.BindingSelection.getMapBindings()RealMapBinder.BindingSelection.getMultimapBindings()Methods in com.google.inject.internal with parameters of type BindingModifier and TypeMethodDescription(package private) ErrorsErrors.bindingAlreadySet(Binding<?> binding, Binding<?> original) private <T> ProvisionListenerStackCallback<T> Creates a newProvisionListenerStackCallbackwith the correct listeners for the key.(package private) static <T> InternalFactory<Provider<T>> InjectorImpl.SyntheticProviderBindingImpl.createInternalFactory(Binding<T> providedBinding) private static <K,V> InternalProvisionException RealMapBinder.createNullValueException(K key, Binding<V> binding) Returns a newProvisionListenerStackCallbackfor the key ornullif there are no listeners(package private) booleanIndexer.isIndexable(Binding<?> binding) (package private) booleanPurges a key from the cache.private voidInjectorImpl.removeFailedJitBinding(Binding<?> binding, InjectionPoint ip) Cleans up any state that may have been cached when constructing the JIT binding.(package private) <T> Initializable<T> Initializer.requestInjection(InjectorImpl injector, T instance, Binding<T> binding, Object source, Set<InjectionPoint> injectionPoints) Registers an instance for member injection when that step is performed.private Object<T> Boolean<T> BooleanMethod parameters in com.google.inject.internal with type arguments of type BindingModifier and TypeMethodDescription<K,V> Errors Errors.duplicateMapKey(Key<Map<K, V>> mapKey, com.google.common.collect.Multimap<K, Binding<V>> duplicates) private static <K,V> String DuplicateMapKeyError.getDuplicateKeysMessage(Key<Map<K, V>> mapKey, com.google.common.collect.Multimap<K, Binding<V>> duplicates) (package private) static <T> com.google.common.collect.ImmutableMultimap<T, DuplicateElementError.Element<T>> DuplicateElementError.indexElements(List<Binding<T>> bindings, T[] values) private static <K,V> void RealMapBinder.BindingSelection.reportDuplicateKeysError(Key<Map<K, V>> mapKey, com.google.common.collect.Multimap<K, Binding<V>> duplicates, Errors errors) Constructors in com.google.inject.internal with parameters of type BindingModifierConstructorDescription(package private)BindingAlreadySetError(Binding<?> binding, Binding<?> original, List<Object> sources) (package private)ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<String> originalBinding, TypeConverterBinding typeConverterBinding) (package private)(package private)IndexedBinding(Binding<?> binding, Indexer.BindingType type, Object scope, Object extraEquality) (package private)KeyBinding(Key<?> key, Binding<?> binding) privatePerKeyData(K key, Binding<V>[] bindings, SingleParameterInjector<V>[] injectors) ProvisionListenerStackCallback(Binding<T> binding, List<ProvisionListener> listeners) (package private)SyntheticProviderBindingImpl(InjectorImpl injector, Key<Provider<T>> key, Binding<T> providedBinding) Constructor parameters in com.google.inject.internal with type arguments of type Binding -
Uses of Binding in com.google.inject.multibindings
Methods in com.google.inject.multibindings that return BindingModifier and TypeMethodDescriptionBinding<?> 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 BindingModifier and TypeMethodDescriptionMultibinderBinding.getElements()Returns all bindings that make up the set.MapBinderBinding.getEntries()Returns all entries in the Map.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 BindingModifier and TypeMethodDescriptionstatic booleanServletScopes.isRequestScoped(Binding<?> binding) Returns true ifbindingis request-scoped. -
Uses of Binding in com.google.inject.spi
Subinterfaces of Binding in com.google.inject.spiModifier and TypeInterfaceDescriptioninterfaceA binding to the constructor of a concrete clss.interfaceA binding created from converting a bound instance to a new type.interfaceA binding to a key exposed from an enclosed private environment.interfaceA binding to a single instance.interfaceA binding to a linked key.interfaceProviderBinding<T extends Provider<?>>A binding to aProviderthat delegates to the binding for the provided type.interfaceA binding to a provider instance.interfaceA binding to a provider key.interfaceAn untargetted binding.Fields in com.google.inject.spi with type parameters of type BindingMethods in com.google.inject.spi that return BindingModifier and TypeMethodDescriptionProvisionListener.ProvisionInvocation.getBinding()Returns the Binding this is provisioning.Methods in com.google.inject.spi that return types with arguments of type BindingModifier and TypeMethodDescriptionProvisionListenerBinding.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 BindingModifier and TypeMethodDescription<T> V<T> VVisit a mapping from a key (type and optional annotation) to the strategy for getting instances of the type.protected VDefaultBindingTargetVisitor.visitOther(Binding<? extends T> binding) Default visit implementation.Method parameters in com.google.inject.spi with type arguments of type BindingModifier and TypeMethodDescriptionvoidElements.RecordingBinder.bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners) Constructor parameters in com.google.inject.spi with type arguments of type BindingModifierConstructorDescription(package private)ProvisionListenerBinding(Object source, Matcher<? super Binding<?>> bindingMatcher, ProvisionListener[] listeners) -
Uses of Binding in com.google.inject.tools.jmx
Fields in com.google.inject.tools.jmx declared as BindingConstructors in com.google.inject.tools.jmx with parameters of type Binding -
Uses of Binding in com.google.inject.util
Methods in com.google.inject.util with parameters of type BindingModifier and TypeMethodDescriptionprivate ScopeModules.OverrideModule.getScopeInstanceOrNull(Binding<?> binding)