public final class Context extends Lookup
The context acts as a Map<Class,Object>
keyed off the concrete
implementation class of the "values".
AbstractRefactoring
Lookup.Item<T>, Lookup.Provider, Lookup.Result<T>, Lookup.Template<T>
Modifier and Type | Method and Description |
---|---|
void |
add(Object value)
Adds value instance into this context.
|
<T> T |
lookup(Class<T> clazz) |
<T> Lookup.Result<T> |
lookup(Lookup.Template<T> template) |
void |
remove(Class<?> clazz)
Removes instance from this context.
|
getDefault, lookupAll, lookupItem, lookupResult
public void add(@NonNull Object value)
value
- the instance the addpublic void remove(@NonNull Class<?> clazz)
clazz
- the class to remove the instance ofpublic <T> Lookup.Result<T> lookup(Lookup.Template<T> template)