commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <>
Subject Re: Can Betwixt/Digester directly access public data members w/o getters/setters?
Date Wed, 07 Dec 2005 17:07:54 GMT
On 12/7/05, Guillermo Bares <> wrote:
> I am working with some classes that have public data members.  These classes
> are out of my control so I cannot create accessor/mutator methods (i.e.
> getters/setters) for them.  I know that one option would be to encapsulate
> classes in a bean, but there are a relatively large number of classes and
> most are heavily nested.  This would result in the creation of many many
> beans.  I am trying to  avoid the maintainance of all these beans.
> 1) Is there any way Betwixt can be configured to use the public data members
> directly?
> 2) If there is no configuration mechanism, I am willing to extend the
> Betwixt/Digester frameworks.  I have a couple ideas on where to start, but I
> would like to hear others.

Digester is able to do what you want, but I think you have to write
your own rule for this (along the lines of SetPropertyRule).
Betwixt on the other hand is specifically targeted at handling
bean-XML mapping, so it cannot do what you want (at least not without
some magic). But since Betwixt extends upon Digester, you probably can
add a digester rule that sets fields instead of properties.


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

View raw message