Package | Description |
---|---|
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. |
Modifier and Type | Method and Description |
---|---|
static <T> Key<T> |
Key.get(Class<T> type)
Gets a key for an injection type.
|
static <T> Key<T> |
Key.get(Class<T> type,
Annotation annotation)
Gets a key for an injection type and an annotation.
|
static <T> Key<T> |
Key.get(Class<T> type,
Class<? extends Annotation> annotationType)
Gets a key for an injection type and an annotation type.
|
static Key<?> |
Key.get(Type type)
Gets a key for an injection type.
|
static Key<?> |
Key.get(Type type,
Annotation annotation)
Gets a key for an injection type and an annotation.
|
static Key<?> |
Key.get(Type type,
Class<? extends 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,
Annotation annotation)
Gets a key for an injection type and an annotation.
|
static <T> Key<T> |
Key.get(TypeLiteral<T> typeLiteral,
Class<? extends Annotation> annotationType)
Gets a key for an injection type and an annotation type.
|
Key<T> |
Binding.getKey()
Returns the key for this binding.
|
Modifier and Type | Method and Description |
---|---|
Map<Key<?>,Binding<?>> |
Injector.getBindings()
Gets all explicit bindings.
|
Modifier and Type | Method and Description |
---|---|
<T> LinkedBindingBuilder<T> |
Binder.bind(Key<T> key)
Creates a binding to a key.
|
protected <T> LinkedBindingBuilder<T> |
AbstractModule.bind(Key<T> key) |
<T> Binding<T> |
Injector.getBinding(Key<T> key)
Gets a binding for the given key.
|
<T> T |
Injector.getInstance(Key<T> key)
Gets an instance bound to the given key; equivalent to
getProvider(key).get() . |
<T> Provider<T> |
Injector.getProvider(Key<T> key)
Gets the provider bound to the given key.
|
<T> Provider<T> |
Scope.scope(Key<T> key,
Provider<T> unscoped)
Scopes a provider.
|
Modifier and Type | Method and Description |
---|---|
ScopedBindingBuilder |
LinkedBindingBuilder.to(Key<? extends T> targetKey)
Binds to another binding with the specified key.
|
ScopedBindingBuilder |
LinkedBindingBuilder.toProvider(Key<? extends Provider<? extends T>> providerKey)
Binds to instances from the provider bound to the given key.
|
Copyright © 2013. All Rights Reserved.