On Mon, Sep 3, 2012 at 5:20 AM, Ceri Storey <ceri.sto...@gmail.com> wrote:
> Hi there.
>
> I'm having a play around with ClojureScript, and I'd find it really useful
> to be able to be able to create some Mockito style test spies. Ultimately,
> I'd like to be able to generate a spie by reflecting over a protocol and
> find out what operations it supports programatically. However, now that I've
> looked core.cljs from the ClojureScript source code, it doesn't seem like
> the compiler actually keeps track of which protocols support which
> operations--is that right? Is there some other way of discovering the
> operations that a cljs protocol supports, or would i need to write my own
> analysis for this?
>
> Thanks,
> --
> Ceri Storey

Are you referring to the ability when using Clojure on the JVM to get
the map of data from referencing the protocol itself?

user=> (defprotocol IFoo (-foo [a b]))
IFoo
user=> IFoo
{:on-interface user.IFoo, :on user.IFoo, :sigs {:-foo {:doc nil,
:arglists ([a b]), :name -foo}}, :var #'user/IFoo, :method-map {:-foo
:-foo}, :method-builders {#'user/-foo #<user$eval319$fn__320
user$eval319$fn__320@76d2796e>}}

?

David

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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