Brian Moseley wrote: > On 9/14/07, James M Snell <[EMAIL PROTECTED]> wrote: > >> 1 Abdera abdera = new Abdera(); >> 2 ConversionContext context = >> 3 new ConventionConversionContext(abdera); >> 4 Foo foo = new Foo(); >> 5 Entry entry = context.convert(entry); > > i like how this looks. nice and simple, especially with the naming > conventions. i assume ConversionContext can also convert an Entry to a > Foo? can it accept an existing instance of Foo to convert the Entry > to? >
The current code is not bi-directional, but if you provide a Converter to turn an Entry to a Foo, then yes, it all should just work. As of right now, the mechanism only supports creating new instances of the destination object but it would not take much to modify the impl so that an existing destination object can be used. - James
