HV-877 Supporting type use constraints on type arguments

This applies to `PropertyMetaData`. After your feedback, I'll continue the work on parameters and return values and I'll extend `ParameterMetaData` and `ReturnValueMetaData`.
I'm also fine with the current name, but
"TypeAnnotationAwareMetaDataProvider" or
"TypeAnnotationAwareAnnotationMetaDataProvider" may help to clarify that
it's not "just" about type annotations.


2014-08-06 7:09 GMT+02:00 Khalid <notifications@github.com>:

> In
> engine/src/main/java/org/hibernate/validator/internal/metadata/provider/TypeUseAnnotationMetaDataProvider.java:
>
> > +import org.hibernate.validator.internal.metadata.core.MetaConstraint;
> > +import org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl;
> > +import org.hibernate.validator.internal.metadata.location.ConstraintLocation;
> > +import org.hibernate.validator.internal.util.ReflectionHelper;
> > +import org.hibernate.validator.internal.util.TypeHelper;
> > +
> > +import static org.hibernate.validator.internal.util.CollectionHelper.newArrayList;
> > +import static org.hibernate.validator.internal.util.CollectionHelper.newHashSet;
> > +
> > +/**
> > + * Extends {@code AnnotationMetaDataProvider} by discovering and registering type use constraints defined on type
> > + * arguments.
> > + *
> > + * @author Khalid Alqinyah
> > + */
> > +public class TypeUseAnnotationMetaDataProvider extends AnnotationMetaDataProvider {
>
>  Regarding the name TypeUseAnnotationMetaDataProvider implies to me
> somehow that this is "just" an annotation provider for type use. Maybe
> something like 'AnnotationMetaDataProviderWithTypeUse` is better. I admit
> though this is a mouth full. WDYT?
>
> I think the documentation and code clearly shows that
> TypeUseAnnotationMetaDataProvider extends a base
> AnnotationMetaDataProvider which is sufficient. But I have no strong
> opinion here, I can go with whatever you prefer.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hibernate/hibernate-validator/pull/332/files#r15856298>
> .
>