public class AnnotationInstanceProvider
extends java.lang.Object
implements de.uni_hildesheim.sse.monitoring.runtime.plugins.internal.Cleanup
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.lang.Class<?>> |
cache
Stores the annotation cache.
|
static AnnotationInstanceProvider |
INSTANCE
Stores the reference to the dynamic annotation instance provider.
|
private static java.lang.String |
INSTANTIATION_ERROR
Defines an error message to be emitted in case of problems during
instantiation.
|
| Constructor and Description |
|---|
AnnotationInstanceProvider()
Creates a new instance provider and initializes the
cache. |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Clears temporary data.
|
void |
cleanupIfRequired()
Do memory cleanup if required.
|
<T extends java.lang.annotation.Annotation> |
get(java.lang.Class<T> annotation,
HashMap<java.lang.String,java.lang.Object> values)
Returns an instance of the given annotation type with member values
specified in the map.
|
public static final AnnotationInstanceProvider INSTANCE
private static final java.lang.String INSTANTIATION_ERROR
protected final java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.lang.Class<?>> cache
public AnnotationInstanceProvider()
cache.public <T extends java.lang.annotation.Annotation> T get(java.lang.Class<T> annotation,
HashMap<java.lang.String,java.lang.Object> values)
T - the concrete type of the annotation (resolved automatically)annotation - the annotation to return an instance forvalues - the individual values for the annotationannotation representing the
valuespublic void cleanup()
cleanup in interface de.uni_hildesheim.sse.monitoring.runtime.plugins.internal.Cleanuppublic void cleanupIfRequired()
cleanupIfRequired in interface de.uni_hildesheim.sse.monitoring.runtime.plugins.internal.Cleanup