Skip to content

Instantly share code, notes, and snippets.

@patrickgombert
Created January 31, 2012 15:57
Show Gist options
  • Save patrickgombert/1711288 to your computer and use it in GitHub Desktop.
Save patrickgombert/1711288 to your computer and use it in GitHub Desktop.
Clojure to Java interop with State
(ns test.wrapper
(:gen-class
:name test.Speak
:state name
:methods [
[hello [] String]
[setName [name] void]
]))
(defn -setName[this name]
(reset! (.name this) name))
(defn -hello [this]
(str "Hello, " (.name this)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment