John Rose schrieb: [...] > On Mar 10, 2009, at 4:35 PM, Jochen Theodorou wrote: > >> ok, but where does that come from? How does it know it should ask >> Groovy? This part is unclear to me, but essential for the whole thing. > > Groovy defines it, in some package it controls. That's why I called > it GroovyInject. Groovy also defines its injector method.
the method defined on the interface was the missing information, thx to Tobias > If Ruby wants to play the same trick, it defines RubyInject and > controls that in a similar way. Anybody can play the game, and there > is no conflict. > > ...Unless interfaces choose the same name/signature pairs; that's a > feature not a bug. Note that GroovyMeta getMeta() would not conflict > with RubyMeta getMeta(), because of return type signatures. so if there is a getMetaClass() method on the object which returns groovy.lang.MetaClass and we inject an interface with an method of exact the same signature, would we then get the implementation from the interface or the one from the object? bye Jochen -- Jochen "blackdrag" Theodorou The Groovy Project Tech Lead (http://groovy.codehaus.org) http://blackdragsview.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
