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 requires
guice-assistedinject.jar . |
com.google.inject.binder |
Interfaces which make up
Binder 's expression language. |
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 requires
guice-multibindings.jar . |
com.google.inject.servlet |
Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar . |
com.google.inject.spi |
Guice service provider interface
|
com.google.inject.throwingproviders |
Extension for injecting objects that may throw at provision time; this extension requires
guice-throwingproviders.jar . |
Modifier and Type | Method and Description |
---|---|
static <T> Key<T> |
Key.get(java.lang.Class<T> type)
Gets a key for an injection type.
|
static <T> Key<T> |
Key.get(java.lang.Class<T> type,
java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation.
|
static <T> Key<T> |
Key.get(java.lang.Class<T> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets a key for an injection type and an annotation type.
|
(package private) static <T> Key<T> |
Key.get(java.lang.Class<T> type,
Key.AnnotationStrategy annotationStrategy)
Gets a key for an injection type and an annotation strategy.
|
static Key<?> |
Key.get(java.lang.reflect.Type type)
Gets a key for an injection type.
|
static Key<?> |
Key.get(java.lang.reflect.Type type,
java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation.
|
static Key<?> |
Key.get(java.lang.reflect.Type type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets a key for an injection type and an annotation type.
|
static <T> Key<T> |
Key.get(TypeLiteral<T> typeLiteral)
Gets a key for an injection type.
|
static <T> Key<T> |
Key.get(TypeLiteral<T> typeLiteral,
java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation.
|
static <T> Key<T> |
Key.get(TypeLiteral<T> typeLiteral,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Gets a key for an injection type and an annotation type.
|
Key<T> |
Binding.getKey()
Returns the key for this binding.
|
<U> Key<U> |
Key.ofType(java.lang.Class<U> type)
Returns a new key of the specified type with the same annotation as this key.
|
Key<?> |
Key.ofType(java.lang.reflect.Type type)
Returns a new key of the specified type with the same annotation as this key.
|
<U> Key<U> |
Key.ofType(TypeLiteral<U> type)
Returns a new key of the specified type with the same annotation as this key.
|
(package private) Key<Provider<T>> |
Key.providerKey()
Gets the key of this key's provider.
|
Key<T> |
Key.withAnnotation(java.lang.annotation.Annotation annotation)
Returns a new key of the same type with the specified annotation.
|
Key<T> |
Key.withAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new key of the same type with the specified annotation.
|
Key<T> |
Key.withoutAttributes()
Returns this key without annotation attributes, i.e.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
protected <T> LinkedBindingBuilder<T> |
AbstractModule.bind(Key<T> key) |
<T> LinkedBindingBuilder<T> |
Binder.bind(Key<T> key)
See the EDSL examples at
Binder . |
protected <T> LinkedBindingBuilder<T> |
PrivateModule.bind(Key<T> key) |
void |
PrivateBinder.expose(Key<?> key)
Makes the binding for
key available to the enclosing environment |
protected <T> void |
PrivateModule.expose(Key<T> key)
Makes the binding for
key available to other modules and the injector. |
<T> Binding<T> |
Injector.getBinding(Key<T> key)
Returns the binding for the given injection key.
|
<T> Binding<T> |
Injector.getExistingBinding(Key<T> key)
Returns the binding if it already exists, or null if does not exist.
|
<T> T |
Injector.getInstance(Key<T> key)
Returns the appropriate instance for the given injection key; equivalent to
getProvider(key).get() . |
protected <T> Provider<T> |
AbstractModule.getProvider(Key<T> key) |
<T> Provider<T> |
Binder.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.
|
<T> Provider<T> |
Injector.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.
|
protected <T> Provider<T> |
PrivateModule.getProvider(Key<T> key) |
protected void |
AbstractModule.requireBinding(Key<?> key)
Adds a dependency from this module to
key . |
protected void |
PrivateModule.requireBinding(Key<?> key)
Instructs Guice to require a binding to the given key.
|
<T> Provider<T> |
Scope.scope(Key<T> key,
Provider<T> unscoped)
Scopes a provider.
|
Modifier and Type | Field and Description |
---|---|
private Key<F> |
FactoryProvider2.factoryKey
The key that this is bound to.
|
(package private) Key<?> |
FactoryProvider2.AssistData.returnType
the return type in the factory method that the constructor is bound to.
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Key<?>,TypeLiteral<?>> |
BindingCollector.bindings |
(package private) com.google.common.collect.ImmutableList<Key<?>> |
FactoryProvider2.AssistData.paramTypes
the parameters in the factory method associated with this data.
|
Modifier and Type | Method and Description |
---|---|
private <T> Key<T> |
FactoryProvider2.assistKey(java.lang.reflect.Method method,
Key<T> key,
Errors errors)
Returns a key similar to
key , but with an @Assisted binding annotation. |
Key<?> |
Parameter.fixAnnotations(Key<?> key)
Replace annotation instances with annotation types, this is only appropriate for testing if a
key is bound and not for injecting.
|
private Key<?> |
Parameter.getBindingForType(java.lang.reflect.Type type) |
Key<T> |
AssistedInjectBinding.getKey()
Returns the
Key for the factory binding. |
Key<F> |
FactoryProvider2.getKey() |
(package private) Key<?> |
Parameter.getPrimaryBindingKey() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Key<?>,TypeLiteral<?>> |
BindingCollector.getBindings() |
Modifier and Type | Method and Description |
---|---|
BindingCollector |
BindingCollector.addBinding(Key<?> key,
TypeLiteral<?> target) |
private <T> Key<T> |
FactoryProvider2.assistKey(java.lang.reflect.Method method,
Key<T> key,
Errors errors)
Returns a key similar to
key , but with an @Assisted binding annotation. |
<F> Module |
FactoryModuleBuilder.build(Key<F> factoryInterface) |
private <T> InjectionPoint |
FactoryProvider2.findMatchingConstructorInjectionPoint(java.lang.reflect.Method method,
Key<?> returnType,
TypeLiteral<T> implementation,
java.util.List<Key<?>> paramList)
Finds a constructor suitable for the method.
|
Key<?> |
Parameter.fixAnnotations(Key<?> key)
Replace annotation instances with annotation types, this is only appropriate for testing if a
key is bound and not for injecting.
|
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(Key<T> source,
java.lang.Class<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(Key<T> source,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
private boolean |
Parameter.isBound(Injector injector,
Key<?> key) |
Modifier and Type | Method and Description |
---|---|
private boolean |
FactoryProvider2.constructorHasMatchingParams(TypeLiteral<?> type,
java.lang.reflect.Constructor<?> constructor,
java.util.List<Key<?>> paramList,
Errors errors)
Matching logic for constructors annotated with AssistedInject.
|
private <T> InjectionPoint |
FactoryProvider2.findMatchingConstructorInjectionPoint(java.lang.reflect.Method method,
Key<?> returnType,
TypeLiteral<T> implementation,
java.util.List<Key<?>> paramList)
Finds a constructor suitable for the method.
|
Constructor and Description |
---|
AssistData(java.lang.reflect.Constructor<?> constructor,
Key<?> returnType,
com.google.common.collect.ImmutableList<Key<?>> paramTypes,
TypeLiteral<?> implementationType,
java.lang.reflect.Method factoryMethod,
java.util.Set<Dependency<?>> dependencies,
boolean optimized,
java.util.List<FactoryProvider2.ThreadLocalProvider> providers) |
FactoryProvider2(Key<F> factoryKey,
BindingCollector collector,
java.lang.invoke.MethodHandles.Lookup userLookups) |
Constructor and Description |
---|
AssistData(java.lang.reflect.Constructor<?> constructor,
Key<?> returnType,
com.google.common.collect.ImmutableList<Key<?>> paramTypes,
TypeLiteral<?> implementationType,
java.lang.reflect.Method factoryMethod,
java.util.Set<Dependency<?>> dependencies,
boolean optimized,
java.util.List<FactoryProvider2.ThreadLocalProvider> providers) |
Modifier and Type | Method and Description |
---|---|
ScopedBindingBuilder |
LinkedBindingBuilder.to(Key<? extends T> targetKey)
See the EDSL examples at
Binder . |
ScopedBindingBuilder |
LinkedBindingBuilder.toProvider(Key<? extends javax.inject.Provider<? extends T>> providerKey)
See the EDSL examples at
Binder . |
Modifier and Type | Field and Description |
---|---|
private Key<?> |
NodeId.key |
private static Key<java.util.logging.Logger> |
DefaultRootKeySetCreator.loggerKey |
Modifier and Type | Method and Description |
---|---|
Key<?> |
NodeId.getKey() |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Key<?>> |
DefaultRootKeySetCreator.getRootKeys(Injector injector) |
java.util.Set<Key<?>> |
RootKeySetCreator.getRootKeys(Injector injector)
Returns the set of starting keys to graph.
|
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(ConstructorBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(ConvertedConstantBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(InstanceBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(LinkedKeyBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(ProviderBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(ProviderInstanceBinding<?> binding) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visit(ProviderKeyBinding<?> binding) |
private java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visitHasDependencies(HasDependencies hasDependencies) |
java.util.Collection<Key<?>> |
TransitiveDependencyVisitor.visitOther(Binding<?> binding) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
NameFactory.getAnnotationName(Key<?> key) |
java.lang.String |
ShortNameFactory.getAnnotationName(Key<?> key) |
java.lang.String |
NameFactory.getClassName(Key<?> key) |
java.lang.String |
ShortNameFactory.getClassName(Key<?> key) |
static NodeId |
NodeId.newInstanceId(Key<?> key) |
static NodeId |
NodeId.newTypeId(Key<?> key) |
Modifier and Type | Method and 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.
|
void |
AbstractInjectorGrapher.graph(Injector injector,
java.util.Set<Key<?>> root) |
void |
InjectorGrapher.graph(Injector injector,
java.util.Set<Key<?>> root)
Graphs the guice dependency graph for the given injector using the given starting keys and
their transitive dependencies.
|
Constructor and Description |
---|
NodeId(Key<?> key,
NodeId.NodeType nodeType) |
Modifier and Type | Field and Description |
---|---|
private Key<T> |
RealOptionalBinder.BindingSelection.actualBindingKey
lazily allocated, by
RealOptionalBinder.BindingSelection.getKeyForActualBinding() . |
private Key<java.util.Collection<javax.inject.Provider<T>>> |
RealMultibinder.BindingSelection.collectionOfJavaxProvidersKey |
private Key<java.util.Collection<Provider<T>>> |
RealMultibinder.BindingSelection.collectionOfProvidersKey |
private Key<T> |
RealOptionalBinder.BindingSelection.defaultBindingKey
lazily allocated, by
RealOptionalBinder.BindingSelection.getKeyForDefaultBinding() . |
private Key<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.entrySetJavaxProviderKey |
private Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.javaxProviderCollectionMultimapKey |
private Key<java.util.Map<K,javax.inject.Provider<V>>> |
RealMapBinder.BindingSelection.javaxProviderMapKey |
private Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.javaxProviderSetMultimapKey |
(package private) Key<T> |
AbstractBindingProcessor.Processor.key |
private Key<T> |
BindingImpl.key |
private Key<?> |
ChildBindingAlreadySetError.key |
private Key<?> |
ConstructorBindingImpl.Factory.key |
private Key<T> |
ExposedKeyFactory.key |
private Key<T> |
ExposureBuilder.key |
private Key<T> |
FactoryProxy.key |
private Key<T> |
Initializer.InjectableReference.key |
private Key<T> |
MissingImplementationError.key |
private Key<T> |
ProviderMethod.key |
(package private) Key<?> |
ProvisionListenerCallbackStore.KeyBinding.key |
private Key<java.lang.Boolean> |
RealMultibinder.PermitDuplicatesModule.key |
private Key<T> |
RealOptionalBinder.BindingSelection.key |
(package private) Key<?> |
WeakKeySet.KeyAndSource.key |
private Key<java.util.Map<K,V>> |
DuplicateMapKeyError.mapKey |
private Key<java.util.Map<K,V>> |
RealMapBinder.BindingSelection.mapKey |
(package private) Key<java.util.Map<K,V>> |
RealMapBinder.RealMultimapBinderProviderWithDependencies.mapKey |
private Key<java.util.Map<K,? extends V>> |
RealMapBinder.BindingSelection.mapOfKeyExtendsValueKey |
private Key<java.util.Map<K,java.util.Set<V>>> |
RealMapBinder.BindingSelection.multimapKey |
protected static Key<?> |
AbstractBindingBuilder.NULL_KEY |
private Key<java.util.Optional<T>> |
RealOptionalBinder.JavaOptionalProvider.optionalKey |
private Key<com.google.common.base.Optional<T>> |
RealOptionalBinder.RealOptionalKeyProvider.optionalKey |
private Key<java.lang.Boolean> |
RealMultibinder.BindingSelection.permitDuplicatesKey |
private Key<java.util.Map<K,java.util.Collection<Provider<V>>>> |
RealMapBinder.BindingSelection.providerCollectionMultimapKey |
(package private) Key<? extends javax.inject.Provider<? extends T>> |
BoundProviderFactory.providerKey |
(package private) Key<? extends javax.inject.Provider<? extends T>> |
LinkedProviderBindingImpl.providerKey |
private Key<? extends javax.inject.Provider<T>> |
ProvidedByInternalFactory.providerKey |
private Key<java.util.Map<K,Provider<V>>> |
RealMapBinder.BindingSelection.providerMapKey |
private Key<java.util.Map<K,java.util.Set<Provider<V>>>> |
RealMapBinder.BindingSelection.providerSetMultimapKey |
private Key<java.util.Set<T>> |
DuplicateElementError.setKey |
private Key<java.util.Set<T>> |
RealMultibinder.BindingSelection.setKey |
private Key<java.util.Set<? extends T>> |
RealMultibinder.BindingSelection.setOfExtendsKey |
private Key<? extends T> |
FactoryProxy.targetKey |
(package private) Key<? extends T> |
LinkedBindingImpl.targetKey |
private Key<? extends T> |
RealOptionalBinder.RealDirectTypeProvider.targetKey |
private Key<V> |
RealMapBinder.ProviderMapEntry.valueKey |
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Key<?>,com.google.common.collect.Multiset<java.lang.Object>> |
WeakKeySet.backingMap |
private static CycleDetectingLock.CycleDetectingLockFactory<Key<?>> |
SingletonScope.cycleDetectingLockFactory
Allows us to detect when circular proxies are necessary.
|
private java.util.Map<Key<?>,Binding<?>> |
InjectorBindingData.explicitBindings |
private java.util.Map<Key<?>,Binding<?>> |
InjectorBindingData.explicitBindingsMutable |
private com.google.common.collect.ImmutableMap<Key<?>,java.lang.Object> |
PrivateElementsImpl.exposedKeysToSources
lazily instantiated
|
private java.util.Set<Key<?>> |
InjectorJitBindingData.failedJitBindings
Cache of Keys that we were unable to create JIT bindings for, so we don't keep trying.
|
private static com.google.common.collect.ImmutableSet<Key<?>> |
ProvisionListenerCallbackStore.INTERNAL_BINDINGS |
private java.util.Map<Key<?>,BindingImpl<?>> |
InjectorJitBindingData.jitBindings
Just-in-time binding cache.
|
Modifier and Type | Method and Description |
---|---|
static <T> Key<T> |
MoreTypes.canonicalizeKey(Key<T> key)
Returns a key that doesn't hold any references to parent classes.
|
(package private) Key<java.util.Collection<javax.inject.Provider<T>>> |
RealMultibinder.BindingSelection.getCollectionOfJavaxProvidersKey() |
(package private) Key<java.util.Collection<Provider<T>>> |
RealMultibinder.BindingSelection.getCollectionOfProvidersKey() |
(package private) Key<T> |
RealOptionalBinder.BindingSelection.getDirectKey() |
private Key<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.getEntrySetJavaxProviderKey() |
private Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.getJavaxProviderCollectionMultimapKey() |
private Key<java.util.Map<K,javax.inject.Provider<V>>> |
RealMapBinder.BindingSelection.getJavaxProviderMapKey() |
private Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
RealMapBinder.BindingSelection.getJavaxProviderSetMultimapKey() |
Key<T> |
BindingImpl.getKey() |
Key<?> |
ExposureBuilder.getKey() |
Key<T> |
ProviderMethod.getKey() |
Key<java.util.Optional<T>> |
RealOptionalBinder.JavaOptionalProvider.getKey() |
Key<com.google.common.base.Optional<T>> |
RealOptionalBinder.RealOptionalKeyProvider.getKey() |
(package private) <T> Key<T> |
ProviderMethodsModule.getKey(Errors errors,
TypeLiteral<T> type,
java.lang.reflect.Member member,
java.lang.annotation.Annotation[] annotations) |
static Key<?> |
Annotations.getKey(TypeLiteral<?> type,
java.lang.reflect.Member member,
java.lang.annotation.Annotation[] annotations,
Errors errors)
Gets a key for the given type, member and annotations.
|
(package private) Key<T> |
RealOptionalBinder.getKeyForActualBinding()
Returns the key to use for the actual binding, overrides the default if set.
|
(package private) Key<T> |
RealOptionalBinder.BindingSelection.getKeyForActualBinding() |
(package private) Key<T> |
RealOptionalBinder.getKeyForDefaultBinding()
Returns the key to use for the default binding.
|
(package private) Key<T> |
RealOptionalBinder.BindingSelection.getKeyForDefaultBinding() |
(package private) Key<T> |
RealMultibinder.getKeyForNewItem()
Adds a new entry to the set and returns the key for it.
|
(package private) Key<V> |
RealMapBinder.getKeyForNewValue(K key)
Adds a binding to the map for the given key.
|
private static <T> Key<Provider<T>> |
RealMapBinder.getKeyOfProvider(Key<T> valueKey)
Given a Key
|
Key<? extends T> |
LinkedBindingImpl.getLinkedKey() |
private Key<java.util.Map<K,V>> |
RealMapBinder.BindingSelection.getMapKey() |
Key<java.util.Map<K,V>> |
RealMapBinder.ExtensionRealMapProvider.getMapKey() |
private Key<java.util.Map<K,? extends V>> |
RealMapBinder.BindingSelection.getMapOfKeyExtendsValueKey() |
private Key<java.util.Map<K,java.util.Set<V>>> |
RealMapBinder.BindingSelection.getMultimapKey() |
(package private) Key<java.lang.Boolean> |
RealMultibinder.BindingSelection.getPermitDuplicatesKey() |
Key<? extends T> |
InjectorImpl.SyntheticProviderBindingImpl.getProvidedKey() |
private static <T> Key<T> |
InjectorImpl.getProvidedKey(Key<Provider<T>> key,
Errors errors) |
private Key<java.util.Map<K,java.util.Collection<Provider<V>>>> |
RealMapBinder.BindingSelection.getProviderCollectionMultimapKey() |
Key<? extends javax.inject.Provider<? extends T>> |
LinkedProviderBindingImpl.getProviderKey() |
private Key<java.util.Map<K,Provider<V>>> |
RealMapBinder.BindingSelection.getProviderMapKey() |
private Key<java.util.Map<K,java.util.Set<Provider<V>>>> |
RealMapBinder.BindingSelection.getProviderSetMultimapKey() |
(package private) Key<java.util.Set<T>> |
RealMultibinder.getSetKey() |
Key<java.util.Set<T>> |
RealMultibinder.ExtensionRealMultibinderProvider.getSetKey() |
(package private) Key<java.util.Set<T>> |
RealMultibinder.BindingSelection.getSetKey() |
(package private) Key<java.util.Set<? extends T>> |
RealMultibinder.BindingSelection.getSetOfExtendsKey() |
Key<java.lang.String> |
InjectorImpl.ConvertedConstantBindingImpl.getSourceKey() |
(package private) Key<V> |
RealMapBinder.ProviderMapEntry.getValueKey() |
<T> Key<T> |
ProvidesMethodScanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint) |
(package private) static <T> Key<Provider<T>> |
RealOptionalBinder.providerOf(Key<T> key) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Key<?>,Binding<?>> |
InjectorImpl.getAllBindings() |
java.util.Map<Key<?>,Binding<?>> |
InternalInjectorCreator.ToolStageInjector.getAllBindings() |
java.util.Set<Key<?>> |
RealOptionalBinder.JavaOptionalProvider.getAlternateKeys() |
java.util.Set<Key<?>> |
RealOptionalBinder.RealOptionalKeyProvider.getAlternateKeys() |
java.util.Set<Key<?>> |
RealMapBinder.ExtensionRealMapProvider.getAlternateMapKeys() |
com.google.common.collect.ImmutableSet<Key<?>> |
RealMultibinder.ExtensionRealMultibinderProvider.getAlternateSetKeys() |
java.util.Map<Key<?>,Binding<?>> |
InjectorImpl.getBindings() |
java.util.Map<Key<?>,Binding<?>> |
InternalInjectorCreator.ToolStageInjector.getBindings() |
java.util.Map<Key<?>,Binding<?>> |
InjectorBindingData.getExplicitBindingsThisLevel() |
java.util.Set<Key<?>> |
PrivateElementsImpl.getExposedKeys() |
(package private) java.util.Map<Key<?>,BindingImpl<?>> |
InjectorJitBindingData.getJitBindings() |
Modifier and Type | Method and Description |
---|---|
void |
WeakKeySet.add(Key<?> key,
InjectorBindingData state,
java.lang.Object source) |
(package private) void |
InjectorJitBindingData.addFailedJitBinding(Key<?> key) |
(package private) void |
InjectorJitBindingData.banKey(Key<?> key,
InjectorBindingData injectorBindingData,
java.lang.Object source)
Forbids the corresponding injector and its ancestors from creating a binding to
key . |
(package private) void |
InjectorJitBindingData.banKeyInParent(Key<?> key,
InjectorBindingData injectorBindingData,
java.lang.Object source)
Similar to
InjectorJitBindingData.banKey(Key, InjectorBindingData, Object) but we only begin banning the
binding at the parent level. |
private <T> void |
BindingProcessor.bindExposed(PrivateElements privateElements,
Key<T> key) |
Errors |
Errors.bindingAlreadySet(Key<?> key,
java.lang.Object source) |
static <T> Key<T> |
MoreTypes.canonicalizeKey(Key<T> key)
Returns a key that doesn't hold any references to parent classes.
|
Errors |
Errors.childBindingAlreadySet(Key<?> key,
java.util.Set<java.lang.Object> sources) |
boolean |
WeakKeySet.contains(Key<?> key) |
private <T> BindingImpl<T> |
InjectorImpl.convertConstantStringBinding(Key<T> key,
Errors errors)
Converts a constant string binding to the required type.
|
(package private) static <T> ConstructorBindingImpl<T> |
ConstructorBindingImpl.create(InjectorImpl injector,
Key<T> key,
InjectionPoint constructorInjector,
java.lang.Object source,
Scoping scoping,
Errors errors,
boolean failIfNotLinked,
boolean atInjectRequired) |
(package private) static <T> ProviderMethod<T> |
ProviderMethod.create(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
boolean skipFastClassGeneration,
java.lang.annotation.Annotation annotation)
Creates a
ProviderMethod . |
private <T> BindingImpl<T> |
InjectorImpl.createImplementedByBinding(Key<T> key,
Scoping scoping,
ImplementedBy implementedBy,
Errors errors)
Creates a binding for a type annotated with @ImplementedBy.
|
private <T> BindingImpl<T> |
InjectorImpl.createJustInTimeBinding(Key<T> key,
Errors errors,
boolean jitDisabled,
InjectorImpl.JitLimitation jitType)
Returns a new just-in-time binding created by resolving
key . |
private <T> BindingImpl<T> |
InjectorImpl.createJustInTimeBindingRecursive(Key<T> key,
Errors errors,
boolean jitDisabled,
InjectorImpl.JitLimitation jitType)
Attempts to create a just-in-time binding for
key in the root injector, falling back to
other ancestor injectors until this injector is tried. |
private <T> BindingImpl<MembersInjector<T>> |
InjectorImpl.createMembersInjectorBinding(Key<MembersInjector<T>> key,
Errors errors) |
(package private) <T> BindingImpl<T> |
InjectorImpl.createProvidedByBinding(Key<T> key,
Scoping scoping,
ProvidedBy providedBy,
Errors errors)
Creates a binding for a type annotated with @ProvidedBy.
|
private <T> BindingImpl<Provider<T>> |
InjectorImpl.createSyntheticProviderBinding(Key<Provider<T>> key,
Errors errors)
Creates a synthetic binding to
Provider<T> , i.e. |
private <T> BindingImpl<TypeLiteral<T>> |
InjectorImpl.createTypeLiteralBinding(Key<TypeLiteral<T>> key,
Errors errors)
Converts a binding for a
Key<TypeLiteral<T>> to the value TypeLiteral<T> . |
(package private) <T> BindingImpl<T> |
InjectorImpl.createUninitializedBinding(Key<T> key,
Scoping scoping,
java.lang.Object source,
Errors errors,
boolean jitBinding)
Creates a binding for an injectable type with the given scope.
|
(package private) static <T> LinkedProviderBindingImpl<T> |
LinkedProviderBindingImpl.createWithInitializer(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
DelayedInitialize delayedInitializer) |
(package private) static <T> LinkedProviderBindingImpl<T> |
LinkedProviderBindingImpl.createWithInitializer(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
DelayedInitialize delayedInitializer) |
<K,V> Errors |
Errors.duplicateMapKey(Key<java.util.Map<K,V>> mapKey,
com.google.common.collect.Multimap<K,Binding<V>> duplicates) |
Errors |
Errors.errorCheckingDuplicateBinding(Key<?> key,
java.lang.Object source,
java.lang.Throwable t) |
Errors |
Errors.exposedButNotBound(Key<?> key) |
private void |
SourceFormatter.formatKey(Key<?> key) |
<T> BindingImpl<T> |
InjectorImpl.getBinding(Key<T> key)
Returns the binding for
key |
<T> Binding<T> |
InternalInjectorCreator.ToolStageInjector.getBinding(Key<T> key) |
(package private) <T> BindingImpl<T> |
InjectorImpl.getBindingOrThrow(Key<T> key,
Errors errors,
InjectorImpl.JitLimitation jitType)
Gets a binding implementation.
|
private static <K,V> java.lang.String |
DuplicateMapKeyError.getDuplicateKeysMessage(Key<java.util.Map<K,V>> mapKey,
com.google.common.collect.Multimap<K,Binding<V>> duplicates) |
<T> BindingImpl<T> |
InjectorImpl.getExistingBinding(Key<T> key) |
<T> Binding<T> |
InternalInjectorCreator.ToolStageInjector.getExistingBinding(Key<T> key) |
<T> BindingImpl<T> |
InjectorBindingData.getExplicitBinding(Key<T> key) |
java.lang.Object |
PrivateElementsImpl.getExposedSource(Key<?> key) |
<T> T |
InjectorImpl.getInstance(Key<T> key) |
<T> T |
InternalInjectorCreator.ToolStageInjector.getInstance(Key<T> key) |
(package private) <T> InternalFactory<? extends T> |
InjectorImpl.getInternalFactory(Key<T> key,
Errors errors,
InjectorImpl.JitLimitation jitType) |
(package private) BindingImpl<?> |
InjectorJitBindingData.getJitBinding(Key<?> key) |
private <T> BindingImpl<T> |
InjectorImpl.getJustInTimeBinding(Key<T> key,
Errors errors,
InjectorImpl.JitLimitation jitType)
Returns a just-in-time binding for
key , creating it if necessary. |
private static <T> Key<Provider<T>> |
RealMapBinder.getKeyOfProvider(Key<T> valueKey)
Given a Key
|
private static <T> Key<T> |
InjectorImpl.getProvidedKey(Key<Provider<T>> key,
Errors errors) |
<T> Provider<T> |
DeferredLookups.getProvider(Key<T> key) |
<T> Provider<T> |
EncounterImpl.getProvider(Key<T> key) |
<T> Provider<T> |
InjectorImpl.getProvider(Key<T> key) |
<T> Provider<T> |
InternalInjectorCreator.ToolStageInjector.getProvider(Key<T> key) |
<T> Provider<T> |
Lookups.getProvider(Key<T> key) |
java.util.Set<java.lang.Object> |
WeakKeySet.getSources(Key<?> key) |
(package private) java.util.Set<java.lang.Object> |
InjectorJitBindingData.getSourcesForBannedKey(Key<?> key)
Returns the source of a banned key.
|
(package private) static <T> com.google.common.collect.ImmutableList<java.lang.String> |
MissingImplementationErrorHints.getSuggestions(Key<T> key,
Injector injector) |
(package private) void |
MembersInjectorImpl.injectAndNotify(T instance,
Key<T> key,
ProvisionListenerStackCallback<T> provisionCallback,
java.lang.Object source,
boolean toolableOnly) |
protected <T> UntargettedBindingImpl<T> |
AbstractBindingProcessor.invalidBinding(InjectorImpl injector,
Key<T> key,
java.lang.Object source) |
(package private) boolean |
InjectorJitBindingData.isBannedKey(Key<?> key)
Returns true if
key is forbidden from being bound in the injector corresponding to this
data object. |
(package private) boolean |
InjectorJitBindingData.isFailedJitBinding(Key<?> key) |
private static boolean |
InjectorImpl.isMembersInjector(Key<?> key)
Returns true if the key type is MembersInjector (but not a subclass of MembersInjector).
|
private static boolean |
InjectorImpl.isProvider(Key<?> key)
Returns true if the key type is Provider (but not a subclass of Provider).
|
private static boolean |
InjectorImpl.isTypeLiteral(Key<?> key) |
Errors |
Errors.jitBindingAlreadySet(Key<?> key) |
Errors |
Errors.jitDisabled(Key<?> key) |
static InternalProvisionException |
InternalProvisionException.jitDisabled(Key<?> key) |
Errors |
Errors.jitDisabledInParent(Key<?> key) |
private boolean |
RealMultibinder.BindingSelection.keyMatches(Key<?> key) |
private boolean |
RealMapBinder.BindingSelection.matchesValueKey(Key<?> key)
Returns true if the key indicates this is a value in the map.
|
Errors |
Errors.missingImplementation(Key<?> key)
We use a fairly generic error message here.
|
(package private) <T> Errors |
Errors.missingImplementationWithHint(Key<T> key,
Injector injector)
Within guice's core, allow for better missing binding messages
|
static java.lang.String |
Annotations.nameOf(Key<?> key)
Returns the name the binding should use.
|
(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 <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) |
(package private) static <T> Key<Provider<T>> |
RealOptionalBinder.providerOf(Key<T> key) |
void |
InjectorBindingData.putBinding(Key<?> key,
BindingImpl<?> binding) |
(package private) void |
InjectorJitBindingData.putJitBinding(Key<?> key,
BindingImpl<?> binding) |
Errors |
Errors.recursiveBinding(Key<?> key,
Key<?> linkedKey) |
Errors |
Errors.recursiveBinding(Key<?> key,
Key<?> linkedKey) |
(package private) void |
InjectorJitBindingData.removeJitBinding(Key<?> key) |
private static <K,V> void |
RealMapBinder.BindingSelection.reportDuplicateKeysError(Key<java.util.Map<K,V>> mapKey,
com.google.common.collect.Multimap<K,Binding<V>> duplicates,
Errors errors) |
(package private) static <T> InternalFactory<? extends T> |
Scoping.scope(Key<T> key,
InjectorImpl injector,
InternalFactory<? extends T> creator,
java.lang.Object source,
Scoping scoping)
Scopes an internal factory.
|
<T> Provider<T> |
SingletonScope.scope(Key<T> key,
Provider<T> creator)
Provides singleton scope with the following properties:
creates no more than one instance per Key as a creator is used no more than once
result is cached and returned quickly on subsequent calls
exception in a creator is not treated as instance creation and is not cached
creates singletons in parallel whenever possible
waits for dependent singletons to be created even across threads and when dependencies
are shared as long as no circular dependencies are detected
returns circular proxy only when circular dependencies are detected
aside from that, blocking synchronization is only used for proxy creation and
initialization
|
BindingBuilder<T> |
BindingBuilder.to(Key<? extends T> linkedKey) |
BindingBuilder<T> |
BindingBuilder.toProvider(Key<? extends javax.inject.Provider<? extends T>> providerKey) |
private <T> void |
AbstractBindingProcessor.validateKey(java.lang.Object source,
Key<T> key) |
protected BindingImpl<T> |
BindingImpl.withKey(Key<T> key) |
protected BindingImpl<T> |
ConstructorBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
InstanceBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
LinkedBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
LinkedProviderBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
ProviderInstanceBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
UntargettedBindingImpl.withKey(Key<T> key) |
Modifier and Type | Method and Description |
---|---|
private boolean |
InjectorImpl.cleanup(BindingImpl<?> binding,
java.util.Set<Key<?>> encountered)
Iterates through the binding's dependencies to clean up any stray bindings that were leftover
from a failed JIT binding.
|
Constructor and 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) |
BindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping) |
BindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping) |
BindingSelection(Key<T> key) |
BindingSelection(Key<T> key) |
BindingSelection(TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
BoundProviderFactory(InjectorImpl injector,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
java.lang.Object source,
ProvisionListenerStackCallback<T> provisionCallback) |
ChildBindingAlreadySetError(Key<?> key,
java.lang.Iterable<java.lang.Object> existingSoruces,
java.util.List<java.lang.Object> sources) |
ConstructorBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> scopedFactory,
Scoping scoping,
ConstructorBindingImpl.Factory<T> factory,
InjectionPoint constructorInjectionPoint) |
ConstructorBindingImpl(Key<T> key,
java.lang.Object source,
Scoping scoping,
InjectionPoint constructorInjectionPoint,
java.util.Set<InjectionPoint> injectionPoints) |
ConvertedConstantBindingImpl(InjectorImpl injector,
Key<T> key,
T value,
Binding<java.lang.String> originalBinding,
TypeConverterBinding typeConverterBinding) |
DuplicateElementError(Key<java.util.Set<T>> setKey,
com.google.common.collect.ImmutableMultimap<T,DuplicateElementError.Element<T>> elements,
java.util.List<java.lang.Object> sources) |
DuplicateElementError(Key<java.util.Set<T>> setKey,
java.util.List<Binding<T>> bindings,
T[] values,
java.util.List<java.lang.Object> sources) |
DuplicateMapKeyError(Key<java.util.Map<K,V>> mapKey,
com.google.common.collect.Multimap<K,Binding<V>> duplicates,
java.util.List<java.lang.Object> sources) |
ExposedBindingImpl(InjectorImpl injector,
java.lang.Object source,
Key<T> key,
InternalFactory<T> factory,
PrivateElements privateElements) |
ExposedKeyFactory(Key<T> key,
PrivateElements privateElements) |
ExposureBuilder(Binder binder,
java.lang.Object source,
Key<T> key) |
Factory(boolean failIfNotLinked,
Key<?> key) |
FactoryProxy(InjectorImpl injector,
Key<T> key,
Key<? extends T> targetKey,
java.lang.Object source) |
FactoryProxy(InjectorImpl injector,
Key<T> key,
Key<? extends T> targetKey,
java.lang.Object source) |
FastClassProviderMethod(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.annotation.Annotation annotation,
java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object> fastMethod) |
InjectableReference(InjectorImpl injector,
T instance,
Key<T> key,
ProvisionListenerStackCallback<T> provisionCallback,
java.lang.Object source,
CycleDetectingLock<?> lock) |
InstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
java.util.Set<InjectionPoint> injectionPoints,
T instance) |
InstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
T instance) |
InternalProviderInstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalProviderInstanceBindingImpl.Factory<T> originalFactory,
InternalFactory<? extends T> scopedFactory,
Scoping scoping) |
JavaOptionalProvider(RealOptionalBinder.BindingSelection<T> bindingSelection,
Key<java.util.Optional<T>> optionalKey) |
KeyAndSource(Key<?> key,
java.lang.Object source) |
KeyBinding(Key<?> key,
Binding<?> binding) |
LinkedBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends T> targetKey) |
LinkedBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends T> targetKey) |
LinkedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
Key<? extends T> targetKey) |
LinkedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
Key<? extends T> targetKey) |
LinkedProviderBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey) |
LinkedProviderBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey) |
LinkedProviderBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
DelayedInitialize delayedInitializer) |
LinkedProviderBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
DelayedInitialize delayedInitializer) |
LinkedProviderBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey) |
LinkedProviderBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
Key<? extends javax.inject.Provider<? extends T>> providerKey) |
MissingImplementationError(Key<T> key,
com.google.common.collect.ImmutableList<java.lang.String> suggestions,
java.util.List<java.lang.Object> sources) |
MissingImplementationError(Key<T> key,
Injector injector,
java.util.List<java.lang.Object> sources) |
PermitDuplicatesModule(Key<java.lang.Boolean> key) |
ProvidedByInternalFactory(java.lang.Class<?> rawType,
java.lang.Class<? extends javax.inject.Provider<?>> providerType,
Key<? extends javax.inject.Provider<T>> providerKey) |
ProviderInstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
javax.inject.Provider<? extends T> providerInstance,
java.util.Set<InjectionPoint> injectionPoints) |
ProviderInstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
javax.inject.Provider<? extends T> providerInstance) |
ProviderMapEntry(K key,
Key<V> valueKey) |
ProviderMethod(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.annotation.Annotation annotation) |
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) |
RealMultimapBinderProviderWithDependencies(Key<java.util.Map<K,V>> mapKey) |
RealMultimapProvider(Key<java.util.Map<K,V>> mapKey) |
RealOptionalBinder(Binder binder,
Key<T> typeKey) |
RealOptionalKeyProvider(RealOptionalBinder.BindingSelection<T> bindingSelection,
Key<com.google.common.base.Optional<T>> optionalKey) |
RealProviderMultimapProvider(Key<java.util.Map<K,V>> mapKey) |
ReflectionProviderMethod(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.annotation.Annotation annotation) |
SyntheticProviderBindingImpl(InjectorImpl injector,
Key<Provider<T>> key,
Binding<T> providedBinding) |
UntargettedBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source) |
UntargettedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping) |
Modifier and Type | Method and Description |
---|---|
Key<T> |
OptionalBinderBinding.getKey()
Returns the
Key for this binding. |
Key<T> |
MapBinderBinding.getMapKey()
Returns the
Key for the map. |
Key<T> |
MultibinderBinding.getSetKey()
Returns the key for the set.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Key<?>> |
OptionalBinderBinding.getAlternateKeys()
Returns the keys of other bindings that represent this OptionalBinder.
|
java.util.Set<Key<?>> |
MapBinderBinding.getAlternateMapKeys()
Returns the keys of other bindings that represent this map.
|
java.util.Set<Key<?>> |
MultibinderBinding.getAlternateSetKeys()
Returns the keys of other bindings that represent this set.
|
Modifier and Type | Method and Description |
---|---|
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
Key<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 a
Set that is
itself bound with the annotation (if any) of the key. |
Modifier and Type | Field and Description |
---|---|
private Key<? extends javax.servlet.Filter> |
FilterDefinition.filterKey |
private Key<? extends javax.servlet.http.HttpServlet> |
ServletDefinition.servletKey |
Modifier and Type | Field and Description |
---|---|
(package private) java.util.Map<Key<?>,java.lang.Object> |
ServletScopes.Context.map |
Modifier and Type | Method and Description |
---|---|
Key<? extends javax.servlet.Filter> |
LinkedFilterBinding.getLinkedKey()
Returns the key used to lookup the filter instance.
|
Key<? extends javax.servlet.Filter> |
LinkedFilterBindingImpl.getLinkedKey() |
Key<? extends javax.servlet.http.HttpServlet> |
LinkedServletBinding.getLinkedKey()
Returns the key used to lookup the servlet instance.
|
Key<? extends javax.servlet.http.HttpServlet> |
LinkedServletBindingImpl.getLinkedKey() |
Modifier and Type | Method and Description |
---|---|
private static GuiceFilter.Context |
GuiceFilter.getContext(Key<?> key) |
(package private) static javax.servlet.http.HttpServletRequest |
GuiceFilter.getOriginalRequest(Key<?> key) |
(package private) static javax.servlet.http.HttpServletRequest |
GuiceFilter.getRequest(Key<?> key) |
(package private) static javax.servlet.http.HttpServletResponse |
GuiceFilter.getResponse(Key<?> key) |
<T> Provider<T> |
ServletScopes.RequestScope.scope(Key<T> key,
Provider<T> creator) |
<T> Provider<T> |
ServletScopes.SessionScope.scope(Key<T> key,
Provider<T> creator) |
void |
FiltersModuleBuilder.FilterKeyBindingBuilderImpl.through(Key<? extends javax.servlet.Filter> filterKey) |
void |
ServletModule.FilterKeyBindingBuilder.through(Key<? extends javax.servlet.Filter> filterKey) |
void |
FiltersModuleBuilder.FilterKeyBindingBuilderImpl.through(Key<? extends javax.servlet.Filter> filterKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
void |
ServletModule.FilterKeyBindingBuilder.through(Key<? extends javax.servlet.Filter> filterKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
private void |
FiltersModuleBuilder.FilterKeyBindingBuilderImpl.through(Key<? extends javax.servlet.Filter> filterKey,
java.util.Map<java.lang.String,java.lang.String> initParams,
javax.servlet.Filter filterInstance) |
private static java.lang.Object |
ServletScopes.validateAndCanonicalizeValue(Key<?> key,
java.lang.Object object)
Validates the key and object, ensuring the value matches the key type, and canonicalizing null
objects to the null sentinel.
|
void |
ServletModule.ServletKeyBindingBuilder.with(Key<? extends javax.servlet.http.HttpServlet> servletKey) |
void |
ServletsModuleBuilder.ServletKeyBindingBuilderImpl.with(Key<? extends javax.servlet.http.HttpServlet> servletKey) |
void |
ServletModule.ServletKeyBindingBuilder.with(Key<? extends javax.servlet.http.HttpServlet> servletKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
void |
ServletsModuleBuilder.ServletKeyBindingBuilderImpl.with(Key<? extends javax.servlet.http.HttpServlet> servletKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
private void |
ServletsModuleBuilder.ServletKeyBindingBuilderImpl.with(Key<? extends javax.servlet.http.HttpServlet> servletKey,
java.util.Map<java.lang.String,java.lang.String> initParams,
javax.servlet.http.HttpServlet servletInstance) |
Modifier and Type | Method and Description |
---|---|
static <T> java.util.concurrent.Callable<T> |
ServletScopes.continueRequest(java.util.concurrent.Callable<T> callable,
java.util.Map<Key<?>,java.lang.Object> seedMap)
Deprecated.
You probably want to use
transferRequest instead |
private static RequestScoper |
ServletScopes.continueRequest(java.util.Map<Key<?>,java.lang.Object> seedMap) |
static <T> java.util.concurrent.Callable<T> |
ServletScopes.scopeRequest(java.util.concurrent.Callable<T> callable,
java.util.Map<Key<?>,java.lang.Object> seedMap)
Scopes the given callable inside a request scope.
|
static RequestScoper |
ServletScopes.scopeRequest(java.util.Map<Key<?>,java.lang.Object> seedMap)
Returns an object that will apply request scope to a block of code.
|
Constructor and Description |
---|
FilterDefinition(Key<? extends javax.servlet.Filter> filterKey,
UriPatternMatcher patternMatcher,
java.util.Map<java.lang.String,java.lang.String> initParams,
javax.servlet.Filter filterInstance) |
LinkedFilterBindingImpl(java.util.Map<java.lang.String,java.lang.String> initParams,
Key<? extends javax.servlet.Filter> target,
UriPatternMatcher patternMatcher) |
LinkedServletBindingImpl(java.util.Map<java.lang.String,java.lang.String> initParams,
Key<? extends javax.servlet.http.HttpServlet> target,
UriPatternMatcher patternMatcher) |
ServletDefinition(Key<? extends javax.servlet.http.HttpServlet> servletKey,
UriPatternMatcher patternMatcher,
java.util.Map<java.lang.String,java.lang.String> initParams,
javax.servlet.http.HttpServlet servletInstance) |
Modifier and Type | Field and Description |
---|---|
private Key<T> |
Dependency.key |
Modifier and Type | Method and Description |
---|---|
Key<T> |
Dependency.getKey()
Returns the key to the binding that satisfies this dependency.
|
Key<T> |
ProviderLookup.getKey() |
Key<T> |
ProvidesMethodBinding.getKey()
Returns the key of the binding.
|
Key<? extends T> |
LinkedKeyBinding.getLinkedKey()
Returns the linked key used to resolve injections.
|
Key<?> |
ProviderBinding.getProvidedKey()
Returns the key whose binding is used to
provide instances . |
Key<? extends javax.inject.Provider<? extends T>> |
ProviderKeyBinding.getProviderKey()
Returns the key used to resolve the provider's binding.
|
Key<java.lang.String> |
ConvertedConstantBinding.getSourceKey()
Returns the key for the source binding.
|
abstract <T> Key<T> |
ModuleAnnotatedMethodScanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint)
Prepares a method for binding.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Key<?>> |
PrivateElements.getExposedKeys()
Returns the unique exposed keys for these private elements.
|
Modifier and Type | Method and Description |
---|---|
<T> AnnotatedBindingBuilder<T> |
Elements.RecordingBinder.bind(Key<T> key) |
void |
Elements.RecordingBinder.expose(Key<?> key) |
private <T> AnnotatedElementBuilder |
Elements.RecordingBinder.exposeInternal(Key<T> key) |
static <T> Dependency<T> |
Dependency.get(Key<T> key)
Returns a new dependency that is not attached to an injection point.
|
java.lang.Object |
PrivateElements.getExposedSource(Key<?> key)
Returns an arbitrary object containing information about the "place" where this key was
exposed.
|
static java.util.Optional<java.lang.String> |
BindingSourceRestriction.getMissingImplementationSuggestion(GuiceInternal guiceInternal,
Key<?> key)
Returns a suggestion for how a restricted binding should be created in case it's missing.
|
<T> Provider<T> |
Elements.RecordingBinder.getProvider(Key<T> key) |
<T> Provider<T> |
TypeEncounter.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.
|
private static RestrictedBindingSource |
BindingSourceRestriction.getRestriction(Key<?> key) |
private static java.lang.String |
BindingSourceRestriction.getViolationMessage(Key<?> key,
java.lang.String explanation,
com.google.common.collect.ImmutableSet<java.lang.Class<? extends java.lang.annotation.Annotation>> acceptablePermits,
boolean annotationRestricted) |
private <T> Dependency<T> |
InjectionPoint.newDependency(Key<T> key,
boolean allowsNull,
int parameterIndex) |
abstract <T> Key<T> |
ModuleAnnotatedMethodScanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint)
Prepares a method for binding.
|
Constructor and Description |
---|
Dependency(InjectionPoint injectionPoint,
Key<T> key,
boolean nullable,
int parameterIndex) |
ProviderLookup(java.lang.Object source,
Key<T> key) |
Modifier and Type | Field and Description |
---|---|
private Key<P> |
ThrowingProviderBinder.SecondaryBinder.interfaceKey |
private Key<T> |
CheckedProviderMethod.key |
private static Key<java.util.logging.Logger> |
CheckedProviderMethodsModule.LOGGER_KEY |
Modifier and Type | Method and Description |
---|---|
private Key<P> |
ThrowingProviderBinder.SecondaryBinder.createKey() |
(package private) Key<P> |
ThrowingProviderBinder.SecondaryBinder.getKey() |
(package private) <T> Key<T> |
CheckedProviderMethodsModule.getKey(Errors errors,
TypeLiteral<T> type,
java.lang.reflect.Member member,
java.lang.annotation.Annotation[] annotations) |
Modifier and Type | Method and Description |
---|---|
private ProviderWithDependencies<ThrowingProviderBinder.Result> |
ThrowingProviderBinder.SecondaryBinder.createResultProvider(Key<? extends CheckedProvider<?>> targetKey,
Provider<? extends CheckedProvider<?>> targetProvider) |
ScopedBindingBuilder |
ThrowingProviderBinder.SecondaryBinder.to(Key<? extends P> targetKey) |
private ScopedBindingBuilder |
ThrowingProviderBinder.SecondaryBinder.toInternal(Key<? extends CheckedProvider<?>> targetKey) |
Constructor and Description |
---|
CheckedProviderMethod(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.util.List<Provider<?>> parameterProviders,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends CheckedProvider> checkedProvider,
java.util.List<TypeLiteral<?>> exceptionTypes,
boolean scopeExceptions) |