I thought there was some minor magic to get types in there though, wasn't that one of the interesting things Rich pointed out at a recent NYC Clojure meetup (Sept, maybe)?
Dave On Nov 5, 2010 10:59 AM, "Kevin Downey" <[email protected]> wrote: > for defining an interface you should use definterface > > On Fri, Nov 5, 2010 at 4:18 AM, Jeff Rose <[email protected]> wrote: >> Hi, >> I'm trying to define an interface for our automated import system >> written in Clojure so that we can use parsers implemented in Java. So >> far everything works great, but I'm wondering if there is any way to >> get types into the method signatures in the interface. For starters I >> created a simple protocol: >> >> (ns importer.parser) >> >> (defprotocol Parser >> (parse ^java.util.Iterator [this ^java.lang.String path])) >> >> compiled it from the repl: >> >> (compile 'importer.parser) >> >> and then when I decompile it using jd-gui I get this: >> >> package importer.parser; >> >> public abstract interface Parser >> { >> public abstract Object parse(Object paramObject); >> } >> >> It would be nice to have a tool that could inspect a Clojure namespace >> and then generate Javadoc for the protocols and types. Does something >> like this already exist? If that javadoc could specify the types, >> even if under the hood it's using Object, that would also be fine. Is >> there a way to access this type hint information though? I don't see >> it in the importer.Parser map. >> >> Thanks, >> Jeff >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to [email protected] >> Note that posts from new members are moderated - please be patient with your first post. >> To unsubscribe from this group, send email to >> [email protected]<clojure%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en > > > > -- > And what is good, Phaedrus, > And what is not good— > Need we ask anyone to tell us these things? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your first post. > To unsubscribe from this group, send email to > [email protected]<clojure%[email protected]> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
