Class AnnotationMetaDataProvider

  • All Implemented Interfaces:
    MetaDataProvider

    public class AnnotationMetaDataProvider
    extends Object
    implements MetaDataProvider
    MetaDataProvider which reads the metadata from annotations which is the default configuration source.
    Author:
    Gunnar Morling, Hardy Ferentschik, Guillaume Smet
    • Method Detail

      • findConstraintAnnotations

        protected <A extends AnnotationList<ConstraintDescriptorImpl<?>> findConstraintAnnotations​(Constrainable constrainable,
                                                                                                     A annotation,
                                                                                                     ConstraintLocation.ConstraintLocationKind type)
        Examines the given annotation to see whether it is a single- or multi-valued constraint annotation.
        Type Parameters:
        A - the annotation type
        Parameters:
        constrainable - The constrainable to check for constraints annotations
        annotation - The annotation to examine
        type - the element type on which the annotation/constraint is placed on
        Returns:
        A list of constraint descriptors or the empty list in case annotation is neither a single nor multi-valued annotation.
      • findTypeAnnotationConstraints

        protected Set<MetaConstraint<?>> findTypeAnnotationConstraints​(JavaBeanField javaBeanField)
        Finds type arguments constraints for fields.
      • findTypeAnnotationConstraints

        protected Set<MetaConstraint<?>> findTypeAnnotationConstraints​(JavaBeanExecutable<?> javaBeanExecutable)
        Finds type arguments constraints for method return values.
      • findTypeAnnotationConstraintsForExecutableParameter

        protected Set<MetaConstraint<?>> findTypeAnnotationConstraintsForExecutableParameter​(JavaBeanExecutable<?> javaBeanExecutable,
                                                                                             JavaBeanParameter javaBeanParameter)
        Finds type arguments constraints for parameters.
        Parameters:
        javaBeanParameter - the parameter
        Returns:
        a set of type arguments constraints, or an empty set if no constrained type arguments are found