|
From: Rob H. <rob...@in...> - 2005-11-01 16:11:55
|
Exactly that.We can find that a method is declared to return a paramerized type and that its arguments are parameterized. Based on this we can have something like: setMyMap(Map<String, Integer>) And at runtime see the parameterization for the Map. Oliver Hutchison wrote: >>On the other hand, when it comes to method signatures, my >>understanding is that the bounding information is available >>through reflection. So you can tell that a method takes a >>List<String> and not a List. I'm not 100% sure on this (and >>confirmation by anybody would be good), but I presume this is >>what Rob is basing his statement below on. >> >> > >This is correct - Java 1.5 does keep generic type information relating >to fields and method signatures (accessible using the new #getGeneric* >methods on Field and Method). I'm taking advantage of this for type >inference in Spring Rich's data binding system. > >Ollie > > >------------------------------------------------------- >This SF.Net email is sponsored by the JBoss Inc. >Get Certified Today * Register for a JBoss Training Course >Free Certification Exam for All Training Attendees Through End of 2005 >Visit http://www.jboss.com/services/certification for more information >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > -- Rob Harrop Principal Consultant Interface21 - Spring Services from the Source http://www.springframework.com |