On Mar 24, 9:47 am, Alessio Stalla <alessiosta...@gmail.com> wrote:
> Reflection is aware of generic type 
> variables:http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Generi...
>
> What is lost at runtime is information about *instantiation* of those
> variables: e.g. you can't distinguish a method returning List<String> from
> one returning List<Integer>.

I think you mean, you can't tell a List<String> from a List<Integer>
once it's been returned. As you demonstrated, telling which kind of
list a particular method will return can be done via reflection.

> (Actually, not even all instantiations of
> generic type variables are lost at runtime, 
> seehttp://gafter.blogspot.com/2006/12/super-type-tokens.htmlfor an example).

That's really nifty. Thanks for the link.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to