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 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.
|
<T> Key<T> |
Key.ofType(java.lang.Class<T> 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.
|
<T> Key<T> |
Key.ofType(TypeLiteral<T> 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.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> |
PrivateModule.bind(Key<T> key) |
<T> LinkedBindingBuilder<T> |
Binder.bind(Key<T> key)
See the EDSL examples at
Binder . |
protected <T> LinkedBindingBuilder<T> |
AbstractModule.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() . |
<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) |
<T> Provider<T> |
Binder.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.
|
protected <T> Provider<T> |
AbstractModule.getProvider(Key<T> key) |
protected void |
PrivateModule.requireBinding(Key<?> key)
Instructs Guice to require a binding to the given key.
|
protected void |
AbstractModule.requireBinding(Key<?> key)
Adds a dependency from this module to
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) |
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 |
ShortNameFactory.getAnnotationName(Key<?> key) |
java.lang.String |
NameFactory.getAnnotationName(Key<?> key) |
java.lang.String |
ShortNameFactory.getClassName(Key<?> key) |
java.lang.String |
NameFactory.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 |
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.
|
void |
AbstractInjectorGrapher.graph(Injector injector,
java.util.Set<Key<?>> root) |
Constructor and Description |
---|
NodeId(Key<?> key,
NodeId.NodeType nodeType) |
Modifier and Type | Field and Description |
---|---|
private Key<T> |
ProviderMethod.key |
private Key<T> |
Initializer.InjectableReference.key |
private Key<T> |
BindingImpl.key |
private Key<?> |
ConstructorBindingImpl.Factory.key |
(package private) Key<?> |
WeakKeySet.KeyAndSource.key |
private Key<T> |
FactoryProxy.key |
(package private) Key<?> |
ProvisionListenerCallbackStore.KeyBinding.key |
private Key<T> |
ExposedKeyFactory.key |
private Key<T> |
ExposureBuilder.key |
(package private) Key<T> |
AbstractBindingProcessor.Processor.key |
protected static Key<?> |
AbstractBindingBuilder.NULL_KEY |
(package private) Key<? extends javax.inject.Provider<? extends T>> |
LinkedProviderBindingImpl.providerKey |
(package private) Key<? extends javax.inject.Provider<? extends T>> |
BoundProviderFactory.providerKey |
private Key<? extends javax.inject.Provider<T>> |
ProvidedByInternalFactory.providerKey |
private Key<? extends T> |
FactoryProxy.targetKey |
(package private) Key<? extends T> |
LinkedBindingImpl.targetKey |
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<?>> |
InheritingState.explicitBindings |
private java.util.Map<Key<?>,Binding<?>> |
InheritingState.explicitBindingsMutable |
private com.google.common.collect.ImmutableMap<Key<?>,java.lang.Object> |
PrivateElementsImpl.exposedKeysToSources
lazily instantiated
|
(package private) java.util.Set<Key<?>> |
InjectorImpl.failedJitBindings
Cache of Keys that we were unable to create JIT bindings for, so we don't
keep trying.
|
private static java.util.Set<Key<?>> |
ProvisionListenerCallbackStore.INTERNAL_BINDINGS |
(package private) java.util.Map<Key<?>,BindingImpl<?>> |
InjectorImpl.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.
|
Key<T> |
ProviderMethod.getKey() |
Key<T> |
BindingImpl.getKey() |
Key<?> |
ExposureBuilder.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.
|
Key<? extends T> |
LinkedBindingImpl.getLinkedKey() |
Key<? extends T> |
InjectorImpl.ProviderBindingImpl.getProvidedKey() |
private static <T> Key<T> |
InjectorImpl.getProvidedKey(Key<Provider<T>> key,
Errors errors) |
Key<? extends javax.inject.Provider<? extends T>> |
LinkedProviderBindingImpl.getProviderKey() |
Key<java.lang.String> |
InjectorImpl.ConvertedConstantBindingImpl.getSourceKey() |
Modifier and Type | Method and Description |
---|---|
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() |
java.util.Map<Key<?>,Binding<?>> |
InheritingState.getExplicitBindingsThisLevel() |
java.util.Map<Key<?>,Binding<?>> |
State.getExplicitBindingsThisLevel()
Returns the explicit bindings at this level only.
|
java.util.Set<Key<?>> |
PrivateElementsImpl.getExposedKeys() |
Modifier and Type | Method and Description |
---|---|
void |
WeakKeySet.add(Key<?> key,
State state,
java.lang.Object source) |
private <T> void |
BindingProcessor.bindExposed(PrivateElements privateElements,
Key<T> key) |
Errors |
Errors.bindingAlreadySet(Key<?> key,
java.lang.Object source) |
void |
InheritingState.blacklist(Key<?> key,
State state,
java.lang.Object source) |
void |
State.blacklist(Key<?> key,
State state,
java.lang.Object source)
Forbids the corresponding injector from creating a binding to
key . |
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 failIfNotExplicit) |
(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.util.List<Provider<?>> parameterProviders,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
boolean skipFastClassGeneration,
java.lang.annotation.Annotation annotation)
Creates a
ProviderMethod . |
(package private) static <T> BindingImpl<T> |
ProviderMethod.createBinding(InjectorImpl injector,
Key<T> key,
ProviderMethod<T> providerMethod,
java.lang.Object source,
Scoping scoping) |
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.createProviderBinding(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) |
Errors |
Errors.errorCheckingDuplicateBinding(Key<?> key,
java.lang.Object source,
java.lang.Throwable t) |
Errors |
Errors.exposedButNotBound(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.
|
<T> BindingImpl<T> |
InjectorImpl.getExistingBinding(Key<T> key) |
<T> Binding<T> |
InternalInjectorCreator.ToolStageInjector.getExistingBinding(Key<T> key) |
<T> BindingImpl<T> |
InheritingState.getExplicitBinding(Key<T> key) |
<T> BindingImpl<T> |
State.getExplicitBinding(Key<T> key)
Gets a binding which was specified explicitly in a module, or null.
|
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) |
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<T> |
InjectorImpl.getProvidedKey(Key<Provider<T>> key,
Errors errors) |
<T> Provider<T> |
InjectorImpl.getProvider(Key<T> key) |
<T> Provider<T> |
Lookups.getProvider(Key<T> key) |
<T> Provider<T> |
InternalInjectorCreator.ToolStageInjector.getProvider(Key<T> key) |
<T> Provider<T> |
DeferredLookups.getProvider(Key<T> key) |
<T> Provider<T> |
EncounterImpl.getProvider(Key<T> key) |
java.util.Set<java.lang.Object> |
WeakKeySet.getSources(Key<?> key) |
java.util.Set<java.lang.Object> |
InheritingState.getSourcesForBlacklistedKey(Key<?> key) |
java.util.Set<java.lang.Object> |
State.getSourcesForBlacklistedKey(Key<?> key)
Returns the source of a blacklisted key.
|
(package private) void |
MembersInjectorImpl.injectAndNotify(T instance,
Errors errors,
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) |
boolean |
InheritingState.isBlacklisted(Key<?> key) |
boolean |
State.isBlacklisted(Key<?> key)
Returns true if
key is forbidden from being bound in this injector. |
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) |
Errors |
Errors.jitDisabledInParent(Key<?> key) |
Errors |
Errors.missingImplementation(Key key)
We use a fairly generic error message here.
|
void |
InternalContext.pushState(Key<?> key,
java.lang.Object source)
Adds to the state without setting the dependency.
|
void |
InheritingState.putBinding(Key<?> key,
BindingImpl<?> binding) |
void |
State.putBinding(Key<?> key,
BindingImpl<?> binding) |
(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) |
BindingImpl<T> |
UntargettedBindingImpl.withKey(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> |
LinkedProviderBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
ProviderInstanceBindingImpl.withKey(Key<T> key) |
BindingImpl<T> |
LinkedBindingImpl.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) |
BoundProviderFactory(InjectorImpl injector,
Key<? extends javax.inject.Provider<? extends T>> providerKey,
java.lang.Object source,
ProvisionListenerStackCallback<T> provisionCallback) |
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) |
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,
net.sf.cglib.reflect.FastClass fc,
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.annotation.Annotation annotation) |
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) |
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) |
ProvidedByInternalFactory(java.lang.Class<?> rawType,
java.lang.Class<? extends javax.inject.Provider<?>> providerType,
Key<? extends javax.inject.Provider<T>> providerKey) |
ProviderBindingImpl(InjectorImpl injector,
Key<Provider<T>> key,
Binding<T> providedBinding) |
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) |
ProviderMethod(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.annotation.Annotation annotation) |
ProviderMethodProviderInstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
ProviderMethod<T> providerInstance,
ProviderMethod.Factory<T> factory) |
ReflectionProviderMethod(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.annotation.Annotation annotation) |
UntargettedBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source) |
UntargettedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping) |
Modifier and Type | Field and Description |
---|---|
private Key<T> |
OptionalBinder.RealOptionalBinder.actualKey |
private Key<java.util.Collection<javax.inject.Provider<T>>> |
Multibinder.RealMultibinder.collectionOfJavaxProvidersKey |
private Key<java.util.Collection<Provider<T>>> |
Multibinder.RealMultibinder.collectionOfProvidersKey |
private Key<T> |
OptionalBinder.RealOptionalBinder.defaultKey |
private Key<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
MapBinder.RealMapBinder.entrySetJavaxProviderKey |
private Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> |
MapBinder.RealMapBinder.MultimapBinder.entrySetKey |
private Key |
OptionalBinder.RealOptionalBinder.javaOptionalJavaxProviderKey |
private Key |
OptionalBinder.RealOptionalBinder.javaOptionalKey |
private Key |
OptionalBinder.RealOptionalBinder.javaOptionalProviderKey |
private Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
MapBinder.RealMapBinder.javaxProviderCollectionMultimapKey |
private Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
MapBinder.RealMapBinder.MultimapBinder.javaxProviderCollectionMultimapKey |
private Key<java.util.Map<K,javax.inject.Provider<V>>> |
MapBinder.RealMapBinder.javaxProviderMapKey |
private Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
MapBinder.RealMapBinder.MultimapBinder.javaxProviderMultimapKey |
private Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
MapBinder.RealMapBinder.javaxProviderSetMultimapKey |
private Key<java.lang.Boolean> |
Multibinder.PermitDuplicatesModule.key |
private Key<java.util.Map<K,V>> |
MapBinder.RealMapBinder.mapKey |
private Key<java.util.Map<K,java.util.Set<V>>> |
MapBinder.RealMapBinder.multimapKey |
private Key<java.util.Map<K,java.util.Set<V>>> |
MapBinder.RealMapBinder.MultimapBinder.multimapKey |
private Key<com.google.common.base.Optional<javax.inject.Provider<T>>> |
OptionalBinder.RealOptionalBinder.optionalJavaxProviderKey |
private Key<com.google.common.base.Optional<T>> |
OptionalBinder.RealOptionalBinder.optionalKey |
private Key<com.google.common.base.Optional<Provider<T>>> |
OptionalBinder.RealOptionalBinder.optionalProviderKey |
private Key<java.lang.Boolean> |
Multibinder.RealMultibinder.permitDuplicatesKey |
private Key<java.util.Map<K,java.util.Collection<Provider<V>>>> |
MapBinder.RealMapBinder.providerCollectionMultimapKey |
private Key<java.util.Map<K,java.util.Collection<Provider<V>>>> |
MapBinder.RealMapBinder.MultimapBinder.providerCollectionMultimapKey |
private Key<java.util.Map<K,Provider<V>>> |
MapBinder.RealMapBinder.providerMapKey |
private Key<java.util.Map<K,java.util.Set<Provider<V>>>> |
MapBinder.RealMapBinder.MultimapBinder.providerMultimapKey |
private Key<java.util.Map<K,java.util.Set<Provider<V>>>> |
MapBinder.RealMapBinder.providerSetMultimapKey |
private Key<java.util.Set<T>> |
Multibinder.RealMultibinder.setKey |
private Key<T> |
OptionalBinder.RealOptionalBinder.typeKey |
private Key<V> |
MapBinder.RealMapBinder.ProviderMapEntry.valueKey |
Modifier and Type | Method and Description |
---|---|
(package private) Key |
Multibinder.RealMultibinder.RealMultibinderCollectionOfProvidersProvider.getCollectionKey() |
Key |
OptionalBinder.RealOptionalBinder.JavaOptionalProvider.getKey() |
Key<com.google.common.base.Optional<T>> |
OptionalBinder.RealOptionalBinder.RealOptionalKeyProvider.getKey() |
Key<T> |
OptionalBinderBinding.getKey()
Returns the
Key for this binding. |
(package private) Key<T> |
OptionalBinder.RealOptionalBinder.getKeyForActualBinding() |
(package private) Key<T> |
OptionalBinder.RealOptionalBinder.getKeyForDefaultBinding() |
(package private) Key<T> |
Multibinder.RealMultibinder.getKeyForNewItem() |
(package private) Key<V> |
MapBinder.RealMapBinder.getKeyForNewValue(K key) |
Key<T> |
MapBinderBinding.getMapKey()
Returns the
Key for the map. |
Key<java.util.Map<K,V>> |
MapBinder.RealMapBinder.RealMapProvider.getMapKey() |
Key<T> |
MultibinderBinding.getSetKey()
Returns the key for the set.
|
Key<java.util.Set<T>> |
Multibinder.RealMultibinder.getSetKey() |
Key<V> |
MapBinder.RealMapBinder.ProviderMapEntry.getValueKey() |
<T> Key<T> |
MultibindingsScanner.Scanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint) |
(package private) static <T> Key<Provider<T>> |
OptionalBinder.providerOf(Key<T> key) |
Modifier and Type | Method and Description |
---|---|
private boolean |
Multibinder.RealMultibinder.keyMatches(Key<?> key) |
private boolean |
OptionalBinder.RealOptionalBinder.matchesJ8Keys(Key<?> elementKey) |
private boolean |
OptionalBinder.RealOptionalBinder.matchesTypeKey(Element element,
Key<?> elementKey)
Returns true if the key & element indicate they were bound by this OptionalBinder.
|
private boolean |
MapBinder.RealMapBinder.matchesValueKey(Key<?> key)
Returns true if the key indicates this is a value in the map.
|
(package private) static java.lang.String |
RealElement.nameOf(Key<?> key)
Returns the name the binding should use.
|
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
Key<T> type) |
(package private) static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
Key<V> valueTypeAndAnnotation) |
private static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
(package private) static <T> OptionalBinder.RealOptionalBinder<T> |
OptionalBinder.newRealOptionalBinder(Binder binder,
Key<T> type) |
(package private) static <T> Multibinder.RealMultibinder<T> |
Multibinder.newRealSetBinder(Binder binder,
Key<T> key)
Implementation of newSetBinder.
|
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. |
<T> Key<T> |
MultibindingsScanner.Scanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint) |
(package private) static <T> Key<Provider<T>> |
OptionalBinder.providerOf(Key<T> key) |
Constructor and Description |
---|
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
MultimapBinder(Key<java.util.Map<K,java.util.Set<V>>> multimapKey,
Key<java.util.Map<K,java.util.Set<Provider<V>>>> providerSetMultimapKey,
Key<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> javaxProviderSetMultimapKey,
Key<java.util.Map<K,java.util.Collection<Provider<V>>>> providerCollectionMultimapKey,
Key<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> javaxProviderCollectionMultimapKey,
Key<java.util.Set<java.util.Map.Entry<K,Provider<V>>>> entrySetKey) |
PermitDuplicatesModule(Key<java.lang.Boolean> key) |
ProviderMapEntry(K key,
Provider<V> provider,
Key<V> valueKey) |
RealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
RealMultibinder(Binder binder,
TypeLiteral<T> elementType,
Key<java.util.Set<T>> setKey) |
RealOptionalBinder(Binder binder,
Key<T> typeKey) |
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> |
LinkedFilterBindingImpl.getLinkedKey() |
Key<? extends javax.servlet.http.HttpServlet> |
LinkedServletBindingImpl.getLinkedKey() |
Key<? extends javax.servlet.Filter> |
LinkedFilterBinding.getLinkedKey()
Returns the key used to lookup the filter instance.
|
Key<? extends javax.servlet.http.HttpServlet> |
LinkedServletBinding.getLinkedKey()
Returns the key used to lookup the servlet instance.
|
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 |
ServletModule.FilterKeyBindingBuilder.through(Key<? extends javax.servlet.Filter> filterKey) |
void |
FiltersModuleBuilder.FilterKeyBindingBuilderImpl.through(Key<? extends javax.servlet.Filter> filterKey) |
void |
ServletModule.FilterKeyBindingBuilder.through(Key<? extends javax.servlet.Filter> filterKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
void |
FiltersModuleBuilder.FilterKeyBindingBuilderImpl.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 |
ServletsModuleBuilder.ServletKeyBindingBuilderImpl.with(Key<? extends javax.servlet.http.HttpServlet> servletKey) |
void |
ServletModule.ServletKeyBindingBuilder.with(Key<? extends javax.servlet.http.HttpServlet> servletKey) |
void |
ServletsModuleBuilder.ServletKeyBindingBuilderImpl.with(Key<? extends javax.servlet.http.HttpServlet> servletKey,
java.util.Map<java.lang.String,java.lang.String> initParams) |
void |
ServletModule.ServletKeyBindingBuilder.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> |
ProvidesMethodBinding.getKey()
Returns the key of the binding.
|
Key<T> |
Dependency.getKey()
Returns the key to the binding that satisfies this dependency.
|
Key<T> |
ProviderLookup.getKey() |
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.
|
<T> Provider<T> |
TypeEncounter.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.
|
<T> Provider<T> |
Elements.RecordingBinder.getProvider(Key<T> key) |
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) |