Clojure: Is it possible to call package protected methods of java? -


i not able find documentation (or blogs) regarding this. possible call package protected methods clojure? have huge java code base , thinking if possible start developing clojure libraries around them.

i tried making namespace same of package in java method (static) not found.

here's quick code example:

 (def (ref 0))  (def klass (class a))  (def m (.getdeclaredmethod klass "currentval" (into-array class [])))  (.setaccessible m true)  (.invoke m (into-array [])) 

you should have @ reflect api

although, recommend using publicly declared fields , methods old java code base.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -