[groovy-user] Fwd: A Groovy version of Python's Docstrings?

88 views
Skip to first unread message

Henson Sturgill

unread,
Oct 3, 2014, 12:10:56 PM10/3/14
to us...@groovy.codehaus.org
I'm still a bit new to Groovy, but I've finally created an abstract
class that I'd like to keep (and maybe pass around.) But I'm wondering
the best way to document it.

From what I remember of Python, there was a certain way that everyone
commented their objects and functions so that documentation could be
automatically generated. Is there anything like that built into
Groovy? If not, is there a commenting style that most everyone
follows?

Thanks!

Henson

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Thibault Kruse

unread,
Oct 3, 2014, 12:22:04 PM10/3/14
to us...@groovy.codehaus.org
There is GroovyDoc, based on Javadoc:
http://www.javaworld.com/article/2074120/core-java/documenting-groovy-with-groovydoc.html
But I guess the trend is to move away from embedding html in the code
comments to something closer to markdown, see here:
https://github.com/asciidoctor/asciidoclet

Paco Zarate

unread,
Oct 3, 2014, 1:21:01 PM10/3/14
to us...@groovy.codehaus.org
Maybe a basic question,

Is it possible to use javadoc directly on groovy files?

Dinko Srkoč

unread,
Oct 4, 2014, 7:36:59 AM10/4/14
to us...@groovy.codehaus.org
On 3 October 2014 19:18, Paco Zarate <cont...@nazcasistemas.com> wrote:
> Maybe a basic question,
>
> Is it possible to use javadoc directly on groovy files?
>

Javadoc, as a tool for generating API documentation in HTML format,
no, for that you need groovydoc.

Javadoc, as a commenting style and tags for classes, methods etc. - yes.

Basically, write javadoc comments, then produce HTML documentation
using groovydoc tool.

Cheers,
Dinko

Keegan Witt

unread,
Oct 4, 2014, 11:40:40 AM10/4/14
to us...@groovy.codehaus.org

It's also worth noting that while you can't use the Javadoc tool on Groovy (even if you change the file extension), you can do the inverse.  That is, to use the Groovydoc tool on Java files.  This is a nice option for mixed (Java and Groovy) projects.  Or you can just configure the Groovydoc tool to have links to your Javadoc where appropriate.

-Keegan

Henson Sturgill

unread,
Oct 5, 2014, 1:51:22 PM10/5/14
to us...@groovy.codehaus.org
Nothing to add, but just wanted to say, "Thank you!" I think I'll
probably use Groovydoc at work, but I definitely want to play around
with asciidoclet at home. I really appreciated the explanations. -
Henson
Reply all
Reply to author
Forward
0 new messages