Reputation: 14187
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 ?
Upvotes: 1
Views: 188
Reputation: 7328
If you have an instance of A you can just call method2
using normal interop:
(.method2 (A.) "param")
Upvotes: 1