commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Blaschke <>
Subject [convert] Type Conversion Library
Date Wed, 10 Nov 2004 10:01:10 GMT
Some time ago, I came to this group with a proposal for a generic type
conversion library.  As a refresher, it is a graph based solution,
where you just drop in your converters and the library will try to
figure out a possible path.

Some example conversions that are working include
  - String -> Integer (via String -> Long -> Integer path)
  - u[] -> v[], given the library knows how to convert u -> v (eg, you
  can simple say
final byte[] bytes = converter.convert(new int[]{1,2,3}, Types.findType("byte[]"));

  - u[] -> List<u>, given the library knows how to convert u -> v

The library's primary goal is to be generic.  Quite useful for rapid
prototyping, or generic conversion (when you don't quite know the input
or output type).

Since you guys weren't too eager on my initial proposal, I don't
expect that you are now - which is ok, really.

But the library may or may not contain thoughts from our initial
discussion, so I'd like to make sure that it is ok that I publish the
library at my discretion.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message