Skip to content

Instantly share code, notes, and snippets.

@hoeck hoeck/gist:569861
Created Sep 8, 2010

What would you like to do?
(defn emit-giws-xml [c]
(let [package (.getPackage c)
methods (map #(hash-map :name (.getName %)
:returnType (str (.getName (.getReturnType %)))
:params (map (fn [p] {:name (.getName %)})
(.getParameterTypes %)))
(.getMethods c))]
(clojure.pprint/pprint (emit-giws-xml Object))
({:name "wait", :returnType "void", :params ({:name "wait"})}
{:name "wait",
:returnType "void",
:params ({:name "wait"} {:name "wait"})}
{:name "wait", :returnType "void", :params ()}
{:name "hashCode", :returnType "int", :params ()}
{:name "getClass", :returnType "java.lang.Class", :params ()}
{:name "equals", :returnType "boolean", :params ({:name "equals"})}
{:name "toString", :returnType "java.lang.String", :params ()}
{:name "notify", :returnType "void", :params ()}
{:name "notifyAll", :returnType "void", :params ()})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.