Hi,
Sampo Niskanen wrote:
> Hi,
>
> I guess the difference is that in my case I'm looking for an easy and
> clean way to store plugin configuration (which should be a simple
> value object) to XML, not serialize the exact state and details of the
> object. If the object contains a field declared as List<String> then
> after serialization-deserialization I don't care what the list type is
> (and neither should the plugin writer).
>
> After a bit more thought I guess what I'm looking for is that whenever
> there's a field declared as List/Set/Map or some other basic
> collection interface, then it is serialized in the implicit format and
> the object type is discarded. When reading such XML a default object
> type is selected (e.g. ArrayList/HashSet/HashMap).
>
> If a field of type MyExtendedList is encountered then the object type
> would still need to be stored, since the default types would not be
> compatible.
>
> Is it possible to choose converters or serialization form based on the
> declared field type?
A converter can do whatever it likes to write and read the content of the
members of an object. It is always in the responsibility of the converter.
What does not work with the solution I suggested in my last mail?
- Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email