This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isProperty patch


Chris Dean wrote:

Here's a patch that adds "isName" property detection, a commonly used
pattern in Java Beans for boolean properties.  This logic in this code
is similar to the logic in java.beans.PropertyDescriptor which plays
fast and loose with with whole "boolean" part of boolean properties.

Thanks. I checked this in.


 The field name is "mangled" (@pxref{Mangling}) into a valid Java name.
 If there is no accessible field whose name is @code{"@var{fieldname}"},
-we look for a no-argument method whose name is @code{"get@var{Fieldname}"}.
+we look for a no-argument method whose name is
+@code{"get@var{Fieldname}"} (or @code{"get@var{Fieldname}"}" for a
+boolean property).

s/or @code{"get/or @code{"is/ s/"}"/"}/ -- --Per Bothner per@bothner.com http://per.bothner.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]