|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Container
Injects dependencies into constructors, methods and fields annotated with
@
Inject
. Iterates explicit Binding
s.
Automatically converts constant values as needed from String
to
any primitive type in addition to enum
and Class<?>
.
Automatically boxes and unboxes primitives. For example, in the absence of
a binding to int
, the container will look for a binding to Integer
.
Contains several default bindings:
Container
Locator<T>
for each binding of type T
Logger
for the class being injected
Stage
specified when this container was created
Guice
Method Summary | ||
---|---|---|
|
findBindingsByType(TypeLiteral<T> type)
Finds all bindings to the given type. |
|
|
getBinding(Key<T> key)
Gets a binding for the given key. |
|
Map<Key<?>,Binding<?>> |
getBindings()
Gets all explicit bindings. |
|
|
getLocator(Class<T> type)
Gets the locator bound to the given type. |
|
|
getLocator(Key<T> key)
Gets the locator bound to the given key. |
|
void |
injectMembers(Object o)
Injects dependencies into the fields and methods of an existing object. |
Method Detail |
---|
void injectMembers(Object o)
Map<Key<?>,Binding<?>> getBindings()
<T> Binding<T> getBinding(Key<T> key)
<T> List<Binding<T>> findBindingsByType(TypeLiteral<T> type)
<T> Locator<T> getLocator(Key<T> key)
<T> Locator<T> getLocator(Class<T> type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |