Observable!

View: New views
2 Messages — Rating Filter:   Alert me  

Observable!

by Fabio Bozzo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi to all Xstream gurus! I have got a question for you:

I want to serialize a class that extends Observable.
If I just do that, I then find in the resulting file:

<changed>java.util. ...... </changed>
</ obs>

I don't want that! I wonder I have to use such @xstreamomitfield or similar.
But I don't have that two fields in the child class! :(
What do you suggest?
Thanks in advance.

Re: Observable!

by Jörg Schaible-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Fabio,

Fabio Bozzo wrote:

> Hi to all Xstream gurus! I have got a question for you:
>
> I want to serialize a class that extends Observable.
> If I just do that, I then find in the resulting file:
>
> <changed>java.util. ...... </changed>
> </ obs>
>
> I don't want that! I wonder I have to use such @xstreamomitfield or
> similar.
> But I don't have that two fields in the child class! :(
> What do you suggest?

You cannot add an annotation to a Java class of the JDK. Call
XStream.omitField.

- Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email