[bv-dev] Value extraction open issue #9: extractors for specific parameterized types
Matt Benson
mbenson at apache.org
Tue Jan 17 11:30:51 EST 2017
I am okay with starting out with wildcards only, *unless* anyone can make a
convincing argument that this will make it more difficult to support
specific type mappings later on.
Matt
On Mon, Jan 16, 2017 at 9:35 AM, Gunnar Morling <gunnar at hibernate.org>
wrote:
> Hi,
>
> Another one from the open issues list: Should we allow extractors to
> be defined for specific parameterized types, e.g.:
>
> public class ListOfIntegerExtractor implements
> ValueExtractor<List<@ExtractedValue Integer>> { ... }
>
> public class ListOfStringExtractor implements
> ValueExtractor<List<@ExtractedValue String>> { ... }
>
> Currently, a value extractor may only mark a wild-card type parameter
> with @ExtractedValue:
>
> public class ListOfStringExtractor implements
> ValueExtractor<List<@ExtractedValue ?>> { ... }
>
> The reason being to cut down on complexity and the lack of any use
> case. Is there any scenario where one would want to extract a list of
> Integer differently than a list String?
>
> I would thus only support wildcard type parameters in extractor
> definitions, unless someone else can see a compelling use case for the
> more liberal model. Note we always can relax the requirement in a
> future revision.
>
> Thanks,
>
> --Gunnar
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20170117/d4af48cc/attachment.html
More information about the beanvalidation-dev
mailing list