Re: XStream versus XMLEncoder
- From: apm35@xxxxxxxxxxxxxxxxxx
- Date: Thu, 6 Dec 2007 00:49:02 -0800 (PST)
On 5 Dec, 14:38, Lew <l...@xxxxxxxxxxxxx> wrote:
The problem with having setters, required for a class with a no-arg
constructor when you want to set values of private members, is that you cannot
make the members final. The advantage of constructors with arguments is that
they let you make the members final.
The complaint about having to use setters is that it prevents the use of final
members.
Thanks for that little snippet, this is just the sort of detail I was
after. I am still new to java so I have not used final much, neither
have I seen it used very much. But I see now that for these classes it
is appropriate and it can't be done when using XMLEncoder. Oh, well.
.
- References:
- XStream versus XMLEncoder
- From: apm35
- Re: XStream versus XMLEncoder
- From: GArlington
- Re: XStream versus XMLEncoder
- From: Lew
- XStream versus XMLEncoder
- Prev by Date: How to do file association through java????
- Next by Date: Re: XStream versus XMLEncoder
- Previous by thread: Re: XStream versus XMLEncoder
- Next by thread: Re: XStream versus XMLEncoder
- Index(es):
Relevant Pages
|