1

Say I have a java library with the following pseudo code :

abstract class B {
    public void method2(String param2) {...}
}

class A extends B {
    public void method1(String param1) {...}
}

I want to use this from Clojure.

I have an instance of A, and I want to invoke method2 without going through Reflection methods.

What's the quickest way ?

4

1 回答 1

1

如果您有 A 的实例,则可以method2使用普通互操作进行调用:

(.method2 (A.) "param")
于 2014-07-03T09:52:46.193 回答