am i correct in thinking that you want to read and write static fields?

betwixt current lacks the ability to read and write fields. since betwixt uses reflection, i think that adding support for reading and writing field to betwixt should solve your problem.

if you want to tackle this, the first place to start is by constructing a FieldUpdater and a FieldExpression to manage writing and reading to the current bean (obtained from the Context) plus unit tests to prove that they work correctly.

next, you'll need to add mechanisms to allow introspection to update and express fields. the easiest way to make this work would be to add support into dot betwixt files. add extra attributes into the element tag to specify the field (rather than the property). change ElementRule so that it creates FieldUpdaters and FieldExpressions. again, create unit tests.

it would be more involved to add automatic discovery at introspection time. i'd suggest a chain of post processing rules to add extra elements and then create a strategy that discovers fields. the default should be the current behaviour (no field discovery).

should be easy but there's quite a bit of leg work.

if you fancy donating your work back to the ASF please post attachment to bugzilla or submit a PATCH. please remember to include the ASF license (signifying that you grant the ASF copyright over the work). for more information please read:

http://jakarta.apache.org/commons/patches.html
http://jakarta.apache.org/site/getinvolved.html

also please remember to use current CVS (either HEAD or the branch would be fine).

hope this is enough to get you started :)

- robert

On 28 Jan 2004, at 22:39, Samuel Cheung wrote:

Thanks. Do you mind where is the best place to add that?

Thank you.


-----Original Message----- From: robert burrell donkin [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 28, 2004 4:29 PM To: Jakarta Commons Developers List Subject: Re: [Betwixt] Write static attributes to XML


On 28 Jan 2004, at 19:16, Samuel Cheung wrote:


Hi,

Does Betwixt support writing static attributes of a class to XML?

probably not at the moment. this is probably a very easy feature to add, though.

- robert


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to