commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Colebourne" <scolebou...@eurobell.co.uk>
Subject [BeanUtils] ConvertUtils changes
Date Fri, 29 Mar 2002 19:01:38 GMT
Hi,
I have been examining the beanutils Convertor/ConvertUtils classes with a
view to using them instead of the type convertor code I have written:
http://www.scolebourne.eurobell.co.uk/JodaTypeConvertor.zip

Currently I have found the following differences:

1) The Joda type convertor is called when an object needs to be converted to
a String. ConvertUtils does not do this. This is essential for classes where
the toString() is for debugging and not a formal string (such as
GregorianCalendar).

2) Joda type convertors support a dynamic convertor creation mechanism.
Basically, you specify that a particular convertor class is to be used for
subclasses of a particular class. When required, a new instance of the
convertor is created, to which the subclass is passed. This is essential for
a case like the standard Enumeration pattern in Java, where I don't want to
have to write a type convertor for each enumeration subclass, instead I just
want to write a convertor for the superclass.


Any feedback on these differences/possible enhancements? I am willing to
contribute to improving ConvertUtils if required.

Stephen


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message