commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29857] - ConvertUtils instead of TypeUtils
Date Tue, 29 Jun 2004 09:43:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29857>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29857

ConvertUtils instead of TypeUtils





------- Additional Comments From xdury@hotmail.com  2004-06-29 09:43 -------
Better use something like this:

TypeUtils.setTypeConverter(new TypeConverter() {
  public boolean canConvert(Object object, Class toType) {
    return ConvertUtils.lookup(toType) != null;
  }
  public Object convert(Object object, Class toType) {
    return ConvertUtils.lookup(toType).convert(toType, object);
  }
});

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


Mime
View raw message