I'm not an expert on this, but I believe that whenever you have generics in 
Java, they have no effect on the bytecode, e.g. a HashMap<String,String> has 
the same type in the bytecode as any other HashMap.  The <String,String> part 
is only used in some checks made by the Java compiler when compiling Java 
source code, and in helping avoid some casting.  As evidence I have used 
reflection to examine the fields and method signatures of some Java classes 
that have generics, and there was nothing in the types except that which was 
specified outside the < ... >.

Andy

On Mar 24, 2011, at 8:04 AM, Jules wrote:

> Thanks for the reply Armando,
> 
> This is pretty much where i was until I was asked to write a dot.net client 
> library for my server.
> 
> I then looked at all my Java code and figured I could write a second copy in 
> C# and then keep the two in sync for ever after, or port it all to Clojure 
> and let ClojureCLR do the work...
> 
> I guess I can't have my cake and eat it.
> 
> In a perfect world, I would be able to sprinkle some extra metadata around my 
> defprotocol to give Java classes implementing it whatever generics goodness 
> they require - but I can understand this being low on Clojure's TODO list :-)
> 
> Jules
> 
> 
> -- 
> 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

-- 
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