Hi Christophe,

It works as per your example, but not with arguments to the method...

ns gncls.MyStatic
  (:gen-class
     :methods [#^{:static true} [f [String] void ]]))

(defn -f
  [s] ; also [this s] doesn't work
  (prn "Hi from " s ))

(gncls.MyStatic/f "me")
java.lang.Exception: No such var: gncls.MyStatic/f (NO_SOURCE_FILE:2)


On Tue, Mar 10, 2009 at 9:18 AM, Christophe Grand <christo...@cgrand.net> wrote:
>
> .Bill Smith a écrit :
>> The genclass documentation says, "Static methods can be specified with
>> #^{:static true} in the signature's metadata."  I thought that would
>> mean this:
>>
>> (ns tango.test.unit.StaticTest
>>     (:gen-class
>>      :methods [[f [] #^{:static true} void ]]))
>>
>>
>
> 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)
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to