public class AnnotationMetaDataProvider extends Object implements MetaDataProvider
MetaDataProvider which reads the metadata from annotations which is the default configuration source.| Modifier and Type | Field and Description |
|---|---|
protected AnnotationProcessingOptions |
annotationProcessingOptions |
protected ConcurrentReferenceHashMap<Class<?>,BeanConfiguration<?>> |
configuredBeans |
protected ConstraintHelper |
constraintHelper |
protected ParameterNameProvider |
parameterNameProvider |
| Constructor and Description |
|---|
AnnotationMetaDataProvider(ConstraintHelper constraintHelper,
ParameterNameProvider parameterNameProvider,
AnnotationProcessingOptions annotationProcessingOptions) |
| Modifier and Type | Method and Description |
|---|---|
protected <A extends Annotation> |
findConstraintAnnotations(Member member,
A annotation,
ElementType type)
Examines the given annotation to see whether it is a single- or multi-valued constraint annotation.
|
protected Set<MetaConstraint<?>> |
findTypeAnnotationConstraintsForExecutableParameter(Member member,
int i)
Finds type arguments constraints for parameters.
|
protected Set<MetaConstraint<?>> |
findTypeAnnotationConstraintsForMember(Member member)
Finds type arguments constraints for fields and methods return values.
|
AnnotationProcessingOptions |
getAnnotationProcessingOptions()
Returns the annotation processing options as configured by this provider.
|
<T> List<BeanConfiguration<? super T>> |
getBeanConfigurationForHierarchy(Class<T> beanClass)
Returns a list with the configurations for all types contained in the
given type's hierarchy (including implemented interfaces) starting at the
specified type.
|
protected final ConstraintHelper constraintHelper
protected final ConcurrentReferenceHashMap<Class<?>,BeanConfiguration<?>> configuredBeans
protected final AnnotationProcessingOptions annotationProcessingOptions
protected final ParameterNameProvider parameterNameProvider
public AnnotationMetaDataProvider(ConstraintHelper constraintHelper, ParameterNameProvider parameterNameProvider, AnnotationProcessingOptions annotationProcessingOptions)
public AnnotationProcessingOptions getAnnotationProcessingOptions()
MetaDataProvidergetAnnotationProcessingOptions in interface MetaDataProviderpublic <T> List<BeanConfiguration<? super T>> getBeanConfigurationForHierarchy(Class<T> beanClass)
MetaDataProvidergetBeanConfigurationForHierarchy in interface MetaDataProviderT - The type of the class to get the configurations for.beanClass - The type of interest.null.protected <A extends Annotation> List<ConstraintDescriptorImpl<?>> findConstraintAnnotations(Member member, A annotation, ElementType type)
A - the annotation typemember - The member to check for constraints annotationsannotation - The annotation to examinetype - the element type on which the annotation/constraint is placed onannotation is neither a
single nor multi-valued annotation.protected Set<MetaConstraint<?>> findTypeAnnotationConstraintsForMember(Member member)
member - the field or methodprotected Set<MetaConstraint<?>> findTypeAnnotationConstraintsForExecutableParameter(Member member, int i)
member - the methodi - the parameter indexCopyright © 2018 JBoss by Red Hat. All rights reserved.