Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 4446 invoked from network); 2 Mar 2003 19:23:48 -0000 Received: from mailgate5.cinetic.de (217.72.192.165) by daedalus.apache.org with SMTP; 2 Mar 2003 19:23:48 -0000 Received: from web.de (fmomail03.dlan.cinetic.de [172.20.1.236]) by mailgate5.cinetic.de (8.11.2/8.11.2/SuSE Linux 8.11.0-0.4) with SMTP id h22JNpE19835 for commons-user@jakarta.apache.org; Sun, 2 Mar 2003 20:23:51 +0100 Date: Sun, 2 Mar 2003 20:23:51 +0100 Message-Id: <200303021923.h22JNpE19835@mailgate5.cinetic.de> MIME-Version: 1.0 Organization: http://freemail.web.de/ From: To: commons-user@jakarta.apache.org Subject: [collections] BeanMap and write-only properties Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello. Java Beans allows for write-only bean properties (see chapter 8.3.1 of the Java Beans specification, 'Simple properties'). With class BeanMap it is possible to handle write-only properties as well. On the other hand, the #keySet method of a BeanMap instance doesn't care about write-only properties, because the key set is computed from the internal set of read methods, and there is no read method for a write-only property. Moreover, the new value parameter of the protected method #firePropertyChange will always be null if write-only properties are involved, because the new value is computed by the use of the read method. The usage of write-only properties is very rare (e.g., see http://java.sun.com/products/javabeans/docs/getListeners_p.html) and I recommend to introduce a comment within methods like #keySet: "Write-only properties aren't included in the returned set of property names, although it is possible to set their value and to get their type." -Peter ______________________________________________________________________________ Belgien, Italien, Portugal,... Mit WEB.DE FreeMail koennen Sie in all diese Laender SMS senden. http://freemail.web.de/features/?mc=021173