|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<Scopes> org.apache.commons.inject.api.bind.Scopes
public enum Scopes
List of the supported scopes.
Enum Constant Summary | |
---|---|
EAGER_SINGLETON
A binding with scope EAGER_SINGLETON will create a single instance,
which is injected whenever the binding is used to inject a value. |
|
LAZY_SINGLETON
A binding with scope EAGER_SINGLETON will create a single instance,
which is injected whenever the binding is used to inject a value. |
|
PER_CALL
A binding with scope PER_CALL will create a new instance,
whenever the binding is used to inject a value. |
Method Summary | |
---|---|
static Scopes |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Scopes[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Scopes PER_CALL
PER_CALL
will create a new instance,
whenever the binding is used to inject a value.
public static final Scopes EAGER_SINGLETON
EAGER_SINGLETON
will create a single instance,
which is injected whenever the binding is used to inject a value. The
instance will be created immediately.
public static final Scopes LAZY_SINGLETON
EAGER_SINGLETON
will create a single instance,
which is injected whenever the binding is used to inject a value. The
instance will be created as soon as required.
Method Detail |
---|
public static Scopes[] values()
for (Scopes c : Scopes.values()) System.out.println(c);
public static Scopes valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |