At 08:08  11/5/01 -0700, Dmitri Plotnikov wrote:
>1. We could introduce a registration mechanism for
>custom type converters. BeanUtils would then invoke
>these type converters one after another until it found
>one that could do the job.  The interface of the
>converter could be something like:
>
>   public interface TypeConverter {
>      boolean canConvert(Class from, Class to);
>      Object convert(Object from, Class to) 
>         throws ConversionException;
>   }
>
>The registration mechanism could either be static
>(which I don't think would be cool) or it could be
>dynamic, with a registry of converters passed to
>BeanUtils in the methods calls.  In a web app, the
>registry could be hosted by the application context,
>in Struts - ActionServlet.

JFYI - thats the method we will most likely implement for ant2 and the
myrmidon proposal already has this implemented.
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*

Reply via email to