public abstract class Scoping extends Object
| Modifier and Type | Field and Description |
|---|---|
static Scoping |
EAGER_SINGLETON
|
static Scoping |
SINGLETON_ANNOTATION
|
static Scoping |
SINGLETON_INSTANCE
|
static Scoping |
UNSCOPED
No scoping annotation has been applied.
|
| Modifier and Type | Method and Description |
|---|---|
abstract <V> V |
acceptVisitor(BindingScopingVisitor
|
abstract void |
applyTo(ScopedBindingBuilder
|
boolean |
equals(Object
|
static Scoping |
forAnnotation(Class
|
static Scoping |
forInstance(Scope
|
Class |
getScopeAnnotation()
Returns the scope annotation, or
null if that isn't known for this instance.
|
Scope |
getScopeInstance()
Returns the scope instance, or
null if that isn't known for this instance.
|
int |
hashCode()
|
boolean |
isEagerSingleton(Stage
Returns true if this scope is a singleton that should be loaded eagerly in
stage.
|
boolean |
isExplicitlyScoped()
Returns true if this scope was explicitly applied.
|
boolean |
isNoScope()
Returns true if this is the default scope.
|
public static final ScopingUNSCOPED
in(Scopes.NO_SCOPE), where the 'NO_SCOPE' has been explicitly applied.
public static final ScopingSINGLETON_ANNOTATION
public static final ScopingSINGLETON_INSTANCE
public static final ScopingEAGER_SINGLETON
public static ScopingforAnnotation(Class <? extends Annotation > scopingAnnotation)
public boolean isExplicitlyScoped()
public boolean isNoScope()
public boolean isEagerSingleton(Stagestage)
stage.
public ScopegetScopeInstance()
null if that isn't known for this instance.
public Class<? extends Annotation > getScopeAnnotation()
null if that isn't known for this instance.
public boolean equals(Objectobj)
public int hashCode()
public abstract <V> V acceptVisitor(BindingScopingVisitor<V> visitor)
public abstract void applyTo(ScopedBindingBuilderscopedBindingBuilder)