Interface ContextManager
- All Known Implementing Classes:
ContextManagerImpl
public interface ContextManager
The entry point to a
Context- Version:
- $Id$
- Author:
- Nicolas Filotto
-
Method Summary
Modifier and TypeMethodDescription<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 Details
-
getContext
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
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
Registers a context- Parameters:
ctx- theContextto register
-