Try:
(ns tango.test.unit.StaticTest
(:gen-class
:methods [#^{:static true} [f [] void ]]))
(untested but that's where gen-class expects the metadata to be/)
HTH
Christophe
--
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)
Hmm, the exception says it is looking for gncls.MyStatic/f, not for
gncls.MyStatic/-f, it hints me that you are not going through the static
method at all but directly to the function through the namespace
gncls.MyStatix. Try and contrast:
(ns gncls.MyStatic
(:gen-class
:methods [#^{:static true} [f [String] void ]]))
(defn -f
[s]
(prn "Hi " s "from -f"))
(defn f
[s]
(prn "Hi " s "from f"))
(gncls.MyStatic/f "me") ; should print "Hi me from f"
(. gncls.MyStatic f "me") ; should print "Hi me from -f"
a/b both means function b in ns a and static method b in class a, when you have both a ns and a class going by the same name the ns wins.
Look for "static" under
http://www.ociweb.com/mark/clojure/article.html#Compiling.
--
R. Mark Volkmann
Object Computing, Inc.