I like the idea of introducing an interface for parameter name
resolution.
The default and simple implementation would be the enumerated names.
+1 for having such an interface. As Hardy said the default
implementation would return names like "arg0", "arg1". And each BV
provider might ship with additional implementations. The
implementation to use might be set via Validator(Factory) like the
other configurable options.
as an alternative we could think about a solution >similar< to
cdi
qualifiers. that would be also useful for cross-field validation.
Could you give some more details on what you have in mind?
i would like to suggest a wiki which shows all possibilities side by
side (+
examples).
+1 for having a wiki page. This might be useful for some collaborative
editing. Although for sharing code snippets using simple gists [1]
might be simpler. There is also a wiki functionality on github [2].
Emmanuel/Hardy: Could you enable that for the beanvalidation repository?
--Gunnar
[1]
https://github.com/features/projects/wikis
[2]
https://gist.github.com/
2011/9/8 Gerhard Petracek <gerhard.petracek(a)gmail.com>:
as an alternative we could think about a solution >similar< to
cdi
qualifiers. that would be also useful for cross-field validation.
i would like to suggest a wiki which shows all possibilities side by
side (+
examples).
> regards,
> gerhard
>
>
>
> 2011/9/8 Hardy Ferentschik <hardy(a)hibernate.org>
>>
>> On Wed, 07 Sep 2011 22:55:47 +0200, Sebastian Thomschke
>> <sebastian.thomschke(a)web.de> wrote:
>>
>> > Its a very unfortunate limitation in Java's reflection API that it does
>> > not provide the ability to determine the declared parameter names. OVal
>> > provides a pluggable parameter name resolver, with a very simple
>> > interface:
>> >
>> > public interface ParameterNameResolver
>> > {
>> > String[] getParameterNames(Constructor< ? > constructor) throws
>> > ReflectionException;
>> > String[] getParameterNames(Method method) throws
>> > ReflectionException;
>> > }
>>
>> I like the idea of introducing an interface for parameter name resolution.
>> The default and simple implementation would be the enumerated names.
>> Other implementations could be based on byte code enhancing (like
>> mentioned here)
>> or a meta model created by an annotation processor (like Kevin suggested
>> in HV-409).
>>
>> --Hardy
>>
>>
>>
>> _______________________________________________
>> beanvalidation-dev mailing list
>> beanvalidation-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>
> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev
>
>