Similarly, for a record with a field (component) called isActive,
its property name is currently "active" and not "isActive".
Additionally, this exposed property is callable as a method even when the 
setting is PROPERTY_ONLY,
due to it being considered a bean property and not a record property.

Is this the compromise we're making and something we'll live with,
or should we add more complexity so that this doesn't always apply?



On Friday, 29 March 2024 at 23:29:31 GMT, Simon Hartley 
<scrhart...@yahoo.co.uk.invalid> wrote: 



I've worked out what my confusion was:

I was setting it to METHOD_ONLY and then becoming confused that the bean get 
method still worked as a property.
Of course, this setting only affects zero-argument non-void methods which ALSO 
aren't bean getter methods.

I think that means that if a class was using non-bean style and has a field 
called isActive,
then if you create a method for it called isActive, then its property name is 
"active", not "isActive"
(even when set to BOTH_PROPERTY_AND_METHOD or PROPERTY_ONLY).
i.e. It's not exposed as both "active" (from the bean property syntax) and 
"isActive" (from the non-bean style).

I hope that's right and all as intended!

Cheers,
Simon

Reply via email to