Interface ContextManager
-
- All Known Implementing Classes:
ContextManagerImpl
public interface ContextManagerThe entry point to aContext- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <K> voidaddContext(AdvancedContext<K> ctx)Registers a context<K> AdvancedContext<K>getContext(Class<? extends Annotation> scope)Gives the context corresponding to the given scopebooleanhasContext(Class<? extends Annotation> scope)Indicates whether or not a context has a been registered for the given scope
-
-
-
Method Detail
-
getContext
<K> AdvancedContext<K> getContext(Class<? extends Annotation> scope)
Gives the context corresponding to the given scope- Parameters:
scope- the annotation class corresponding to the scope- Returns:
- the
Contextcorresponding to the given scope
-
hasContext
boolean hasContext(Class<? extends Annotation> scope)
Indicates whether or not a context has a been registered for the given scope- Parameters:
scope- the scope of the context- Returns:
trueif it exists a context for the given scope,falseotherwise
-
addContext
<K> void addContext(AdvancedContext<K> ctx)
Registers a context- Parameters:
ctx- theContextto register
-
-