Another little wrinkle...
If I declare a method in an Ng class with the same name and the same
number of parameters as a method in a Java class which the Ng class
subaclasses and the parameters in the Ng method are untyped than I
want the Ng method to always be called in preference to the Java
method. I.E. untyped formal parameters are always a perfect match for
actual parameters of any type.
The problem comes when I look at the method definition at runtime via
reflection. I can't tell the difference between def foo(a) {... and
def foo(Object a) {.... as they both have a single parameter of type
Object.
My intention is to use an annotation to allow the runtime system to
tell of a formal parameter with type Object is actually untyped or not
but I have not yet got round to implementing it.
Groovy has this as a potential issue because it also supports optional
typing. It may be less of an issue for JRuby/Jython but I think you
can construct cases where the runtime system would need to know if
it's calling a Jython/JRuby method or a Java one.
John Wilson
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---