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.assistedinject Extension for combining factory interfaces with injection; this extension requiresguice-assistedinject.jar.com.google.inject.grapher 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.servlet Servlet API scopes, bindings and registration; this extension requiresguice-servlet.jar.com.google.inject.spi Guice service provider interfacecom.google.inject.tools.jmx JMX integration; this extension requiresguice-jmx.jar.com.google.inject.util Helper methods for working with Guice. -
-
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(java.lang.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> java.util.List<Binding<T>>Injector. findBindingsByType(TypeLiteral<T> type)Returns all explicit bindings fortype.java.util.Map<Key<?>,Binding<?>>Injector. getAllBindings()Returns a snapshot of this injector's bindings, both explicit and just-in-time.java.util.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 booleanScopes. isScoped(Binding<?> binding, Scope scope, java.lang.Class<? extends java.lang.annotation.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 Binding Modifier and Type Method Description protected 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 Binding Modifier and Type Field Description (package private) Binding<?>FactoryProvider2.AssistData. cachedBindingused to perform optimized factory creations.Methods in com.google.inject.assistedinject that return Binding Modifier and Type Method Description Binding<?>FactoryProvider2. getBindingFromNewInjector(java.lang.reflect.Method method, java.lang.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 Binding Modifier and Type Method Description private <T extends Binding<?> & HasDependencies>
java.util.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, java.lang.Object instance)Returns a new instance node for the givenBinding.Methods in com.google.inject.grapher that return types with arguments of type Binding Modifier and Type Method Description private java.lang.Iterable<Binding<?>>AbstractInjectorGrapher. getBindings(Injector injector, java.util.Set<Key<?>> root)Returns the bindings for the root keys and their transitive dependencies.Methods in com.google.inject.grapher with parameters of type Binding Modifier and Type Method Description private ImplementationNodeDefaultNodeCreator.NodeVisitor. newImplementationNode(Binding<?> binding, java.util.Collection<java.lang.reflect.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.java.util.Collection<Edge>DefaultEdgeCreator.EdgeVisitor. visitOther(Binding<?> binding)java.util.Collection<Node>DefaultNodeCreator.NodeVisitor. visitOther(Binding<?> binding)java.util.Collection<Key<?>>TransitiveDependencyVisitor. visitOther(Binding<?> binding)Method parameters in com.google.inject.grapher with type arguments of type Binding Modifier and Type Method Description java.lang.Iterable<Alias>AliasCreator. createAliases(java.lang.Iterable<Binding<?>> bindings)Returns aliases for the given dependency graph.java.lang.Iterable<Alias>ProviderAliasCreator. createAliases(java.lang.Iterable<Binding<?>> bindings)java.lang.Iterable<Edge>DefaultEdgeCreator. getEdges(java.lang.Iterable<Binding<?>> bindings)java.lang.Iterable<Edge>EdgeCreator. getEdges(java.lang.Iterable<Binding<?>> bindings)Returns edges for the given dependency graph.java.lang.Iterable<Node>DefaultNodeCreator. getNodes(java.lang.Iterable<Binding<?>> bindings)java.lang.Iterable<Node>NodeCreator. getNodes(java.lang.Iterable<Binding<?>> bindings)Returns nodes for the given dependency graph. -
Uses of Binding in com.google.inject.internal
Classes in com.google.inject.internal that implement Binding Modifier and Type Class Description classBindingImpl<T>(package private) classConstructorBindingImpl<T>classExposedBindingImpl<T>private static classInjectorImpl.ConvertedConstantBindingImpl<T>private static classInjectorImpl.ProviderBindingImpl<T>(package private) classInstanceBindingImpl<T>(package private) classInternalProviderInstanceBindingImpl<T>AProviderInstanceBindingImplfor implementing 'native' guice extensions.classLinkedBindingImpl<T>(package private) classLinkedProviderBindingImpl<T>(package private) classProviderInstanceBindingImpl<T>(package private) classUntargettedBindingImpl<T>Fields in com.google.inject.internal declared as Binding Modifier and Type Field Description (package private) Binding<?>ProvisionListenerCallbackStore.KeyBinding. bindingprivate Binding<T>ProvisionListenerStackCallback. bindingprivate Binding<V>[]RealMapBinder.MultimapBinder.RealMultimapProvider.PerKeyData. bindings(package private) Binding<java.lang.String>InjectorImpl.ConvertedConstantBindingImpl. originalBindingFields in com.google.inject.internal with type parameters of type Binding Modifier and Type Field Description private com.google.common.collect.ImmutableList<Binding<T>>RealMultibinder.BindingSelection. bindingsprivate java.util.List<Binding<T>>RealMultibinder.RealMultibinderProvider. bindings(package private) com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>>InjectorImpl. bindingsMultimapprivate com.google.common.collect.ImmutableList<java.util.Map.Entry<K,Binding<V>>>RealMapBinder.BindingSelection. entriesprivate java.util.Map<Key<?>,Binding<?>>InheritingState. explicitBindingsprivate java.util.Map<Key<?>,Binding<?>>InheritingState. explicitBindingsMutableprivate com.google.common.collect.ImmutableMap<K,Binding<V>>RealMapBinder.BindingSelection. mapBindingsThese are built during initialization and used by all factories to actually provide the relevant maps.private com.google.common.collect.ImmutableMap<K,java.util.Set<Binding<V>>>RealMapBinder.BindingSelection. multimapBindingsMethods in com.google.inject.internal that return Binding Modifier and Type Method Description Binding<?>RealOptionalBinder.JavaOptionalProvider. getActualBinding()Binding<?>RealOptionalBinder.RealOptionalKeyProvider. getActualBinding()<T> Binding<T>InjectorImpl. getBinding(java.lang.Class<T> type)<T> Binding<T>InternalInjectorCreator.ToolStageInjector. getBinding(Key<T> key)<T> Binding<T>InternalInjectorCreator.ToolStageInjector. getBinding(java.lang.Class<T> type)Binding<T>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 Binding Modifier and Type Method Description <T> java.util.List<Binding<T>>InjectorImpl. findBindingsByType(TypeLiteral<T> type)<T> java.util.List<Binding<T>>InternalInjectorCreator.ToolStageInjector. findBindingsByType(TypeLiteral<T> type)java.util.Map<Key<?>,Binding<?>>InjectorImpl. getAllBindings()java.util.Map<Key<?>,Binding<?>>InternalInjectorCreator.ToolStageInjector. getAllBindings()java.util.Map<Key<?>,Binding<?>>InjectorImpl. getBindings()java.util.Map<Key<?>,Binding<?>>InternalInjectorCreator.ToolStageInjector. getBindings()(package private) com.google.common.collect.ImmutableList<Binding<T>>RealMultibinder.BindingSelection. getBindings()(package private) java.util.List<Binding<?>>RealMultibinder.BindingSelection. getElements()java.util.List<Binding<?>>RealMultibinder.RealMultibinderProvider. getElements()private com.google.common.collect.ImmutableList<java.util.Map.Entry<K,Binding<V>>>RealMapBinder.BindingSelection. getEntries()java.util.List<java.util.Map.Entry<?,Binding<?>>>RealMapBinder.RealMapProvider. getEntries()java.util.List<java.util.Map.Entry<?,Binding<?>>>RealMapBinder.RealMapProvider. getEntries(java.lang.Iterable<? extends Element> elements)java.util.Map<Key<?>,Binding<?>>InheritingState. getExplicitBindingsThisLevel()java.util.Map<Key<?>,Binding<?>>State. getExplicitBindingsThisLevel()Returns the explicit bindings at this level only.private com.google.common.collect.ImmutableMap<K,Binding<V>>RealMapBinder.BindingSelection. getMapBindings()private com.google.common.collect.ImmutableMap<K,java.util.Set<Binding<V>>>RealMapBinder.BindingSelection. getMultimapBindings()Methods in com.google.inject.internal with parameters of type Binding Modifier and Type Method Description private <T> ProvisionListenerStackCallback<T>ProvisionListenerCallbackStore. create(Binding<T> binding)Creates a newProvisionListenerStackCallbackwith the correct listeners for the key.(package private) static <T> InternalFactory<Provider<T>>InjectorImpl.ProviderBindingImpl. createInternalFactory(Binding<T> providedBinding)private static <K,V>
InternalProvisionExceptionRealMapBinder. createNullValueException(K key, Binding<V> binding)<T> ProvisionListenerStackCallback<T>ProvisionListenerCallbackStore. get(Binding<T> binding)Returns a newProvisionListenerStackCallbackfor the key ornullif there are no listeners(package private) booleanIndexer. isIndexable(Binding<?> binding)(package private) booleanProvisionListenerCallbackStore. remove(Binding<?> type)Purges 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, java.lang.Object source, java.util.Set<InjectionPoint> injectionPoints)Registers an instance for member injection when that step is performed.private java.lang.ObjectIndexer. scope(Binding<?> binding)<T> java.lang.BooleanBindingProcessor. visit(Binding<T> command)<T> java.lang.BooleanUntargettedBindingProcessor. visit(Binding<T> binding)Method parameters in com.google.inject.internal with type arguments of type Binding Modifier and Type Method Description private static <K,V>
voidRealMapBinder.BindingSelection. reportDuplicateKeysError(com.google.common.collect.Multimap<K,Binding<V>> duplicates, Errors errors)Constructors in com.google.inject.internal with parameters of type Binding Constructor Description ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<java.lang.String> originalBinding, TypeConverterBinding typeConverterBinding)IndexedBinding(Binding<?> binding, Indexer.BindingType type, java.lang.Object scope, java.lang.Object extraEquality)KeyBinding(Key<?> key, Binding<?> binding)PerKeyData(K key, Binding<V>[] bindings, SingleParameterInjector<V>[] injectors)ProviderBindingImpl(InjectorImpl injector, Key<Provider<T>> key, Binding<T> providedBinding)ProvisionListenerStackCallback(Binding<T> binding, java.util.List<ProvisionListener> listeners) -
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 java.util.List<Binding<?>>MultibinderBinding. getElements()Returns all bindings that make up the set.java.util.List<java.util.Map.Entry<?,Binding<?>>>MapBinderBinding. getEntries()Returns all entries in the Map.java.util.List<java.util.Map.Entry<?,Binding<?>>>MapBinderBinding. getEntries(java.lang.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 booleanServletScopes. isRequestScoped(Binding<?> binding)Returns true ifbindingis request-scoped. -
Uses of Binding in com.google.inject.spi
Subinterfaces of Binding in com.google.inject.spi Modifier and Type Interface Description interfaceConstructorBinding<T>A binding to the constructor of a concrete clss.interfaceConvertedConstantBinding<T>A binding created from converting a bound instance to a new type.interfaceExposedBinding<T>A binding to a key exposed from an enclosed private environment.interfaceInstanceBinding<T>A binding to a single instance.interfaceLinkedKeyBinding<T>A binding to a linked key.interfaceProviderBinding<T extends Provider<?>>A binding to aProviderthat delegates to the binding for the provided type.interfaceProviderInstanceBinding<T>A binding to a provider instance.interfaceProviderKeyBinding<T>A binding to a provider key.interfaceUntargettedBinding<T>An untargetted binding.Fields in com.google.inject.spi with type parameters of type Binding Modifier and Type Field Description private Matcher<? super Binding<?>>ProvisionListenerBinding. bindingMatcherMethods 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> VDefaultElementVisitor. visit(Binding<T> binding)<T> VElementVisitor. visit(Binding<T> binding)Visit 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 Binding Modifier and Type Method Description voidElements.RecordingBinder. bindListener(Matcher<? super Binding<?>> bindingMatcher, ProvisionListener... listeners)Constructor parameters in com.google.inject.spi with type arguments of type Binding Constructor Description ProvisionListenerBinding(java.lang.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 Binding Modifier and Type Field Description (package private) BindingManagedBinding. bindingConstructors in com.google.inject.tools.jmx with parameters of type Binding Constructor Description ManagedBinding(Binding binding) -
Uses of Binding in com.google.inject.util
Methods in com.google.inject.util with parameters of type Binding Modifier and Type Method Description private ScopeModules.OverrideModule. getScopeInstanceOrNull(Binding<?> binding)
-