|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.Scopes
public class Scopes
Built-in scope implementations.
| Field Summary | |
|---|---|
static Scope |
NO_SCOPE
No scope; the same as not applying any scope at all. |
static Scope |
SINGLETON
One instance per Injector. |
| Method Summary | |
|---|---|
static boolean |
isSingleton(Binding<?> binding)
Returns true if binding is singleton-scoped. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Scope SINGLETON
Injector. Also see @Singleton.
public static final Scope NO_SCOPE
This exists only in case a class has been annotated with a scope
annotation such as @Singleton, and you need to override
this to "no scope" in your binding.
| Method Detail |
|---|
public static boolean isSingleton(Binding<?> binding)
binding is singleton-scoped. If the binding is a linked key binding and belongs to an injector (ie. it
was retrieved via Injector.getBinding()), then this method will
also true if the target binding is singleton-scoped.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||