Skip to content

Instantly share code, notes, and snippets.

@ndimiduk
Created April 7, 2010 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndimiduk/359131 to your computer and use it in GitHub Desktop.
Save ndimiduk/359131 to your computer and use it in GitHub Desktop.
(ns com.foo.Foo)
(gen-interface
:name com.foo.IFoo
:methods [[foo [String] #=(java.lang.Class/forName "[Ljava.lang.String;")]])
(gen-class
:name com.foo.Foo
:implements [com.foo.IFoo])
(defn -foo
[#^String arg]
(into-array [(str "foo!" arg)]))
@ndimiduk
Copy link
Author

ndimiduk commented Apr 7, 2010

gen-interface uses different type-resolution code than gen-class. This is necessary to use a native array in an interface method signature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment