|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Scope
A scope which bound objects can reside in. Add a new scope using ContainerBuilder.scope(String, Scope)
and reference it from
bindings using its name.
Scope implementations should override toString()
and include the
creator's toString()
output. Doing so aids debugging.
Method Summary | ||
---|---|---|
|
scope(Key<T> key,
Factory<T> creator)
Scopes a factory. |
Method Detail |
---|
<T> Factory<T> scope(Key<T> key, Factory<T> creator)
key
- binding keycreator
- creates new instances as needed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |