I would have a look at the Joda typeconvertors.

They concentrate on Object->String and String->Object. Add Object-Object
later if anyone really needs it.

They also have a mechanism for dealing with superclass/subclass
relationships. You can register a TypeConvertorFactory that creates
TypeConvertors for subclasses of a specified type. This is necessary for
enumerated types, where they all fulfil the same interface and you don't
want a specific convertor coded for each enum.

So, the registry starts with a combination of a map of known convertors for
specific classes (no inheritance lookup), and a map of factories by
supertype (with inheritance lookup). The first time a factory is invoked,
the resulting convertor is placed into the first map, thus speeding up
subsequent lookups.

Stephen


----- Original Message -----
From: "Henri Yandell" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 4:36 AM
Subject: Re: [convert] initial code commit


>
> To save people effort, the design doc is:
>
>
http://cvs.apache.org/viewcvs/jakarta-commons-sandbox/convert/xdocs/convert.
png?rev=HEAD&content-type=text/vnd.viewcvs-markup
>
> Hen
>
>
> ---------------------------------------------------------------------
> 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