public class AnnotationMetaDataProvider extends Object implements MetaDataProvider
MetaDataProvider which reads the metadata from annotations which is the default configuration source.| Constructor and Description |
|---|
AnnotationMetaDataProvider(ConstraintHelper constraintHelper,
TypeResolutionHelper typeResolutionHelper,
ValueExtractorManager valueExtractorManager,
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<?>> |
findTypeAnnotationConstraints(Executable executable,
AnnotatedType annotatedReturnType)
Finds type arguments constraints for method return values.
|
protected Set<MetaConstraint<?>> |
findTypeAnnotationConstraints(Field field)
Finds type arguments constraints for fields.
|
protected Set<MetaConstraint<?>> |
findTypeAnnotationConstraintsForExecutableParameter(Executable executable,
int i,
AnnotatedType parameterAnnotatedType)
Finds type arguments constraints for parameters.
|
AnnotationProcessingOptions |
getAnnotationProcessingOptions()
Returns the annotation processing options as configured by this provider.
|
<T> BeanConfiguration<T> |
getBeanConfiguration(Class<T> beanClass)
Returns a bean configuration for the given type or
null if this provider has no meta-data on the given
type. |
public AnnotationMetaDataProvider(ConstraintHelper constraintHelper, TypeResolutionHelper typeResolutionHelper, ValueExtractorManager valueExtractorManager, AnnotationProcessingOptions annotationProcessingOptions)
public AnnotationProcessingOptions getAnnotationProcessingOptions()
MetaDataProvidergetAnnotationProcessingOptions in interface MetaDataProviderpublic <T> BeanConfiguration<T> getBeanConfiguration(Class<T> beanClass)
MetaDataProvidernull if this provider has no meta-data on the given
type.getBeanConfiguration in interface MetaDataProviderprotected <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<?>> findTypeAnnotationConstraints(Field field)
protected Set<MetaConstraint<?>> findTypeAnnotationConstraints(Executable executable, AnnotatedType annotatedReturnType)
protected Set<MetaConstraint<?>> findTypeAnnotationConstraintsForExecutableParameter(Executable executable, int i, AnnotatedType parameterAnnotatedType)
executable - the executablei - the parameter indexCopyright © 2019 JBoss by Red Hat. All rights reserved.