|
|
|
Hi Joerg,
yes, I know it's breaking compatibility. It was just an hack for pressure. An field annotation could be a better solution. Have you an estimate of when that feature could be availble in XStream? Let me know if I could help. Lucio Hi,
I just relized that my patch is in fact backward compatible. If you have a single implicit collection in you class, you can still write: @XStreamImplicitCollection("properties")... Of course a field annotation could still be better... Lucio Hehehe, you simply revealed my lack of JDK 5 knowledge :)
Hello,
as discussed in the dev mailing-list, a field annotation is a better approach for defining an implicit collection. I implemented it for my purposes. Attached you'll find: * XStreamImplicit.java : source of the new field level annotation * ImplicitCollectionTest.java : some tests of the new annotation * Annotations.java : modified source of the annotation configurator * annotations.diff : diff file between the original Annotations.java and my modifed file. Hope this help, and could be integrated in XStream. Lucio Implementation and tests of the @XStreamImplicit field annotation.
Diff file of Annotations.java after the introduction of the @XStreamImplicit field annotation
Hi Lucio,
thanks a lot for the patch and the test cases. I've applied it to the subversion repository. You might build a SNAPSHOT version of XStream yourself. - Jörg |
||||||||||||||||||||||||||||||||||||||||||||||
the problem with this modification is, that it breaks backward compatibility. Nevertheless, we were discussing internally about this annotation anyway, since we have the impression, it should be assigned to a field and not to a class.
... we'll see ...