A few other thoughts here:

- To elaborate on Colin's suggestion a bit, if you define Java interfaces 
in Java, it's easy to create a function that reifies those interfaces (this 
means that it returns an object that implements arbitrary interfaces).  In 
this case the only interop a consumer would need to worry about would be a 
call to a Clojure function that returns an instance of the relevant object. 
 Such a function would basically serve the role of a factory constructor. 
 Everything else would be plain Java from their point of 
view. https://clojuredocs.org/clojure.core/reify
- Apologies if it's too obvious, but Clojure does have a docs tool. 
 Obviously it wouldn't look the same as Javadocs, but it might fit your 
needs with a little elaboration in the docstrings on how to call them from 
Java. https://github.com/weavejester/codox
- If you really need Javadoc (corporate compliance reasons?), you could 
create a Java class that uses the Clojure Java API to call the Clojure 
functions and expose that class.  I personally prefer using gen-class with 
static methods that call the relevant Clojure functions, since manually 
writing a Java wrapper for Clojure functions gets a little tedious, but it 
does allow complete hiding of the Clojure code behind a Java 
wrapper. 
http://clojure.github.io/clojure/javadoc/clojure/java/api/package-summary.html

On Tuesday, May 19, 2015 at 4:41:29 AM UTC-5, Timur wrote:
>
> Hi everyone,
>
> Is it possible to add JavaDocs to Clojure so that it can support Java 
> programmers. For instance a JavaDoc to a protocol or to an interface 
> defined in Clojure which is later on read by a Java developer?
>
> Regards,
>
> Timur
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to