for defining an interface you should use definterface

On Fri, Nov 5, 2010 at 4:18 AM, Jeff Rose <ros...@gmail.com> 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 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



-- 
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 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