Hi all, sorry for jumping in and maybe being off topic, but the problem of generics erasure and reflection also bugged me in my Apache Lab, and I also came up with a small library to avoid reinventing the wheel any time, and was recently proposing it to people in Apache Commons. They said that there could be space for such a thing in commons-lang, and I feel that if there is a place in ASF for such utility stuff is in commons. You can find the thread here : http://www.nabble.com/-all--Generics-and-Return-Type--tt16595948.html#a19605981
I don't know how much this is related, cause I don't know Xbeans to understand if the connection is proper, but seems like many of us are working on very similar stuff, and we could join the effort. Simone Jason van Zyl wrote: > I suggest you both talk to Dain and see about integrating it into > XBean. XBean is used for all of Geronimo's EE injection and Dain/David > are pretty thorough. I'm not planning on using anything else on trunk. > > On 25-Sep-08, at 10:15 AM, Mark Hobson wrote: > >> 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] >> > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > jason at sonatype dot com > ---------------------------------------------------------- > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Simone Gianni CEO Semeru s.r.l. Apache Committer MALE human being programming a computer http://www.simonegianni.it/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
