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
Post a Comment