[jdom-interest] Could you please provide BeanInfo classes?
Elliotte Rusty Harold
elharo at metalab.unc.edu
Fri Oct 11 05:58:03 PDT 2002
At 5:27 PM -0700 10/1/02, Alexey Solofnenko wrote:
>Many tools can work with JavaBeans properties directly. Some scripting
>languages provide syntactic sugar that allow 'node.text="Some Text"' or even
>'note.text+="\n"+msg' instead of 'node.setText("Some Text")'. Java can guess
>properties, but unfortunately (and intentionally) JDOM setters do not follow
>Java standards for setters ( void set<PropertyName>(Type value) ). To make
>Java to recognize JDom setters as property setters <Class>BeanInfo class
>should be defined that describes what properties (with what getters and
>setters) the class has.
>
For what it's worth I have long argued against JDOM setters not
returning void, but most of the developers disagree with me.
More recently, I introduced an XML API in which all setters do return
void, and most methods follow JavaBeans conventions. See
http://www.cafeconleche.org/XOM/. I'm not sure if the indexed setters
and getters follow JavaBeans conventions or not. I should check that.
I don't want there to be gratuitous differences.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list