public class KeyValueProviderContext extends Object implements ProviderContext
| Modifier and Type | Field and Description |
|---|---|
(package private) Map<Class<?>,Annotation> |
annotationMap |
(package private) Map<String,Object> |
attributes |
(package private) Class<?> |
targetType |
| Constructor and Description |
|---|
KeyValueProviderContext() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
attribute(Class<T> key)
Retrieve an attribute ( identified by
key ), from current
context. |
<T> void |
attribute(Class<T> key,
T value) |
Object |
attribute(String key)
Retrieve an attribute ( identified by
key ), from current
context. |
void |
attribute(String key,
Object value) |
<A extends Annotation> |
getAnnotation(Class<A> anntationClass)
The list of annotations present on the target.
|
<A extends Annotation> |
setAnnotation(Class<A> anntationClass,
A annotation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittargetTypefinal Map<Class<?>,Annotation> annotationMap
Class<?> targetType
public <A extends Annotation> A getAnnotation(Class<A> anntationClass)
ProviderContextgetAnnotation in interface ProviderContextpublic <A extends Annotation> void setAnnotation(Class<A> anntationClass, A annotation)
public <T> void attribute(Class<T> key, T value)
public Object attribute(String key)
ProviderContextkey ), from current
context. Returns null if no object associated to the provided
key was found.attribute in interface ProviderContextpublic <T> T attribute(Class<T> key)
ProviderContextkey ), from current
context. Returns null if no object associated to the provided
key was found.attribute in interface ProviderContextCopyright © 2015. All rights reserved.