2008/9/24 Joerg Hohwiller <[EMAIL PROTECTED]>: >> Also xbean-reflect "thinks" in java.lang.reflect.Type terms so it's easy >> to add converters that are generics-aware. For example I recently added >> converters for Map<K,V> and Set<T> and List<T> and it only took an hour. > > I spent the last year with creating support for this. > You have to rebuild all the stuff that is in javac but missing in the JDK. > The erasure was maybe the only way to introduce generics but it is a > real pain. I almost got braindead with this. > > Is <? super CharSequence>.isAssignableFrom(<? super String>) > or vice versa?
FWIW, I've written a small library here internally for working with Types that: - provides a factory to create the various incarnations - implements isAssignable and other useful Class methods for Types - formats and parses Types to and from Strings - provides type literals (like Guice's TypeLiteral) I agree this kind of code should be available in the JDK to prevent people from reinventing the wheel. If there's any interest I could look into open-sourcing it? Cheers, Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
