commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Priblouda <kpriblo...@yahoo.com>
Subject Re: Can Betwixt/Digester directly access public data members w/o getters/setters?
Date Wed, 07 Dec 2005 17:17:15 GMT


--- Thomas Dudziak <tomdzk@gmail.com> wrote:

> On 12/7/05, Guillermo Bares <gfbares@hotmail.com>
> 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.


You may also be happy with xstream, which bypasses
getters and
setters ( but keep in mint, that it is serializer /
deserealiser,
and also bypasses default constructors.... ) 

regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org


		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message