|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Key | |
---|---|
com.google.inject | Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework. |
com.google.inject.binder | Interfaces which make up Binder 's
expression language. |
com.google.inject.internal | Guice (sounds like like "juice") |
com.google.inject.spi | Guice service provider interface |
Uses of Key in com.google.inject |
---|
Methods in com.google.inject that return Key | ||
---|---|---|
static
|
Key.get(java.lang.Class<T> type)
Gets a key for an injection type. |
|
static
|
Key.get(java.lang.Class<T> type,
java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation. |
|
static
|
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. |
|
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
|
Key.get(TypeLiteral<T> typeLiteral)
Gets a key for an injection type. |
|
static
|
Key.get(TypeLiteral<T> typeLiteral,
java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation. |
|
static
|
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. |
Methods in com.google.inject that return types with arguments of type Key | |
---|---|
java.util.Map<Key<?>,Binding<?>> |
Injector.getBindings()
Returns all explicit bindings. |
Methods in com.google.inject with parameters of type Key | ||
---|---|---|
|
Binder.bind(Key<T> key)
See the EDSL examples at Binder . |
|
protected
|
AbstractModule.bind(Key<T> key)
|
|
protected
|
PrivateModule.bind(Key<T> key)
|
|
void |
PrivateBinder.expose(Key<?> key)
Makes the binding for key available to the enclosing environment |
|
protected
|
PrivateModule.expose(Key<T> key)
Makes the binding for key available to other modules and the injector. |
|
|
Injector.getBinding(Key<T> key)
Returns the binding for the given injection key. |
|
|
Injector.getInstance(Key<T> key)
Returns the appropriate instance for the given injection key; equivalent to getProvider(key).get() . |
|
|
Binder.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key. |
|
|
Injector.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key. |
|
protected
|
AbstractModule.getProvider(Key<T> key)
|
|
protected
|
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. |
|
|
Scope.scope(Key<T> key,
Provider<T> unscoped)
Scopes a provider. |
Uses of Key in com.google.inject.binder |
---|
Methods in com.google.inject.binder with parameters of type Key | |
---|---|
ScopedBindingBuilder |
LinkedBindingBuilder.to(Key<? extends T> targetKey)
See the EDSL examples at Binder . |
ScopedBindingBuilder |
LinkedBindingBuilder.toProvider(Key<? extends Provider<? extends T>> providerKey)
See the EDSL examples at Binder . |
Uses of Key in com.google.inject.internal |
---|
Fields in com.google.inject.internal declared as Key | |
---|---|
protected static Key<?> |
AbstractBindingBuilder.NULL_KEY
|
Methods in com.google.inject.internal that return Key | |
---|---|
Key<?> |
ExposureBuilder.getKey()
|
Key<T> |
BindingImpl.getKey()
|
Key<T> |
ProviderMethod.getKey()
|
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 Provider<? extends T>> |
LinkedProviderBindingImpl.getProviderKey()
|
Methods in com.google.inject.internal that return types with arguments of type Key | |
---|---|
java.util.Set<Key<?>> |
PrivateElementsImpl.getExposedKeys()
|
Methods in com.google.inject.internal with parameters of type Key | |
---|---|
Errors |
Errors.bindingAlreadySet(Key<?> key,
java.lang.Object source)
|
Errors |
Errors.childBindingAlreadySet(Key<?> key)
|
void |
Errors.exposedButNotBound(Key<?> key)
|
java.lang.Object |
PrivateElementsImpl.getExposedSource(Key<?> key)
|
Errors |
Errors.missingImplementation(Key key)
We use a fairly generic error message here. |
BindingBuilder<T> |
BindingBuilder.to(Key<? extends T> linkedKey)
|
BindingBuilder<T> |
BindingBuilder.toProvider(Key<? extends Provider<? extends T>> providerKey)
|
protected BindingImpl<T> |
BindingImpl.withKey(Key<T> key)
|
BindingImpl<T> |
UntargettedBindingImpl.withKey(Key<T> key)
|
ExposedBindingImpl<T> |
ExposedBindingImpl.withKey(Key<T> key)
|
BindingImpl<T> |
LinkedProviderBindingImpl.withKey(Key<T> key)
|
BindingImpl<T> |
InstanceBindingImpl.withKey(Key<T> key)
|
BindingImpl<T> |
ProviderInstanceBindingImpl.withKey(Key<T> key)
|
BindingImpl<T> |
LinkedBindingImpl.withKey(Key<T> key)
|
Constructors in com.google.inject.internal with parameters of type Key | |
---|---|
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(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping)
|
|
BindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping)
|
|
ExposedBindingImpl(Injector injector,
java.lang.Object source,
Key<T> key,
InternalFactory<T> factory,
PrivateElements privateElements)
|
|
ExposedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
PrivateElements privateElements)
|
|
ExposureBuilder(Binder binder,
java.lang.Object source,
Key<T> key)
|
|
InstanceBindingImpl(Injector 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)
|
|
LinkedBindingImpl(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends T> targetKey)
|
|
LinkedBindingImpl(Injector 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(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends Provider<? extends T>> providerKey)
|
|
LinkedProviderBindingImpl(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Key<? extends Provider<? extends T>> providerKey)
|
|
ProviderInstanceBindingImpl(Injector injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
Provider<? extends T> providerInstance,
java.util.Set<InjectionPoint> injectionPoints)
|
|
ProviderInstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
Provider<? extends T> providerInstance)
|
|
UntargettedBindingImpl(Injector injector,
Key<T> key,
java.lang.Object source)
|
|
UntargettedBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping)
|
Uses of Key in com.google.inject.spi |
---|
Methods in com.google.inject.spi that return Key | |
---|---|
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 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. |
Methods in com.google.inject.spi that return types with arguments of type Key | |
---|---|
java.util.Set<Key<?>> |
PrivateElements.getExposedKeys()
Returns the unique exposed keys for these private elements. |
Methods in com.google.inject.spi with parameters of type Key | ||
---|---|---|
static
|
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. |
|
|
TypeEncounter.getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key. |
Constructors in com.google.inject.spi with parameters of type Key | |
---|---|
ProviderLookup(java.lang.Object source,
Key<T> key)
|
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |