[bv-dev] MethodDescriptors and overloading

Matt Benson mbenson at apache.org
Fri Nov 9 17:29:48 EST 2012


Same must apply for constructors of course.

The alternative, IMO, is that #getConstrainedMethods() and
#getConstrainedConstructors() are replaced by boolean
#hasConstrainedMethods() and #hasConstrainedConstructors(), respectively,
as that is all the current methods are really good for.

Matt


On Fri, Nov 9, 2012 at 4:20 PM, Matt Benson <mbenson at apache.org> wrote:

> When calling BeanDescriptor#getConstraintsForMethod(...) a caller already
> knows the full signature of the method about which he is inquiring.  With
> BeanDescriptor#getConstrainedMethods() this is not the case.  Once the
> caller has gotten this information, the only useful things he knows are
> either  (A) that no methods are constrained, or (B) one or more methods are
> constrained, with a particular set of names.  He still has to call
> #getConstraintsForMethod(...) for every method whose name matches one
> returned by the gCM() call (let's not discuss how useful it may be to know
> the highest constrained parameter index).  This could be cleared up very
> simply by adding #getParameterTypes() to MethodDescriptor, and I urge that
> we do so.
>
> Matt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/beanvalidation-dev/attachments/20121109/71b91e4a/attachment.html 


More information about the beanvalidation-dev mailing list