commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <>
Subject Re: [BeanUtils] Possible to hook in a different getter/setter naming convention?
Date Sun, 04 Jan 2009 20:00:42 GMT
On Fri, Jan 2, 2009 at 11:13 PM, kennardconsulting
<> wrote:
> Dear All,
> I am enjoying using Commons BeanUtils with all its converters and
> '' path notation goodness.
> I was wondering if it was possible to retain this goodness whilst changing
> to a different getter/setter naming convention? Instead of 'getFoo()',
> 'setFoo(x)', I'd like to use 'foo()' and 'foo_$eq(x)' which is the native
> Scala naming convention.

BeanUtils uses Introspector[1] at its heart[2] to discover the
properties of a bean - which is based on the java bean spec and tied
to the get/set naming convention for methods. So if you want to change
this behaviour you would need to start by overriding the
getPropertyDescriptors() method in PropertyUtilsBean



> Is there some method/interface to override to make this change without
> impacting everything else?
> Regards,
> Richard.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message