[bv-dev] Method level validation
Hardy Ferentschik
hardy at hibernate.org
Thu Sep 8 04:23:08 EDT 2011
On Wed, 07 Sep 2011 22:55:47 +0200, Sebastian Thomschke
<sebastian.thomschke at 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
More information about the beanvalidation-dev
mailing list