public class AnnotationInstanceProvider extends Object
Provides dynamic annotation creation.
AnnotationLiteral| Constructor and Description |
|---|
AnnotationInstanceProvider() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Annotation> |
get(Class<T> annotationType,
Map<String,?> values)
Returns an instance of the given annotation type with attribute values specified in the map.
|
public static <T extends Annotation> T get(Class<T> annotationType, Map<String,?> values)
Returns an instance of the given annotation type with attribute values specified in the map.
Annotation, array and enum types the values must exactly match the declared return type of the attribute or a
ClassCastException will result.
Character or String.
Number.
If am member does not have a corresponding entry in the value map then the annotations default value will be used.
If the annotation member does not have a default value then a NullMemberException will be thrown
annotationType - the type of the annotation instance to generatevalues - the attribute values of this annotationCopyright © 2019 JBoss by Red Hat. All rights reserved.