| Modifier and Type | Method and Description |
|---|---|
static void |
configureObject(Object obj,
ContextManager contextManager,
ContextInjector contextInjector) |
static Context |
createFixedContext(Collection<?> content) |
static Context |
emptyContext()
Returns an immutable empty
Context. |
static <T> T |
find(Object localContextProvider,
Class<T> type)
Finds an instance of the specified type in the local context of the provided
LocalContextProvider. |
static Context |
getLocalContext(Object localContextProvider)
Gets the local
Context of a LocalContextProvider. |
public static Context emptyContext()
Context.public static Context getLocalContext(Object localContextProvider)
Context of a LocalContextProvider.localContextProvider - a LocalContextProviderClassCastException - if localContextProvider does not implement LocalContextProviderpublic static <T> T find(Object localContextProvider, Class<T> type)
LocalContextProvider. If the local context has more than one instance of the specified type, the first one
found will be returned.T - the specified typelocalContextProvider - a LocalContextProvidertype - the specified typenull if no instance was found or if localContextProvider does not implement LocalContextProvider.
TODO: return Optional?public static Context createFixedContext(Collection<?> content)
public static void configureObject(Object obj, ContextManager contextManager, ContextInjector contextInjector)
Copyright © 2012–2018 Drombler. All rights reserved.