???
2009/2/13 Craig McDaniel <[email protected]>
>
> I just tried it out to be sure. Overloaded methods with the same arity
> work as expected. Clojure picks the right method to call via
> reflection.
>
> package expmeth;
> public class ClassA {
> public void hello() {
> System.err.println("hello from Java!");
> }
> public void hello(int x) {
> System.err.println("hello from Java. int: " + x);
> }
> public void hello(String x) {
> System.err.println("hello from Java. string: " + x);
> }
> }
>
> (ns expmeth.TestMe
> (:gen-class
> :extends expmeth.ClassA
> :exposes-methods {hello helloSuper}))
>
> (defn -hello
> ([this]
> (.helloSuper this)
> (println "hello from clojure!"))
> ([this x]
> (.helloSuper this x)
> (println "hello from clojure..." x)))
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" 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/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---