I have a groovy script/closure that is defined in a file named "myClosure.groovy" and the contents look like this:
# myClosure.groovy
def call(Map config) {
.....
}
I need to keep the code this way. I want to document this with groovydoc, but I'm not sure how to add a description to the class.
Using a regular class I can do this:
/**
* My class
*/
class myClass {
But I have no explicit class definition.
groovydoc sees it as:
class myClosure
extends groovy.lang.Script
I can add docs to the call()
function but how can I write a description for the class with groovydoc too? This is not possible out of the box: https://issues.apache.org/jira/browse/GROOVY-8877
Is there some way to alter the class groovydoc template?
I'm trying to understand the custom template thing. Does it require me to override the default template and copy all of its functionality? Is there some way to just staple this on to the default class template? For example, could this be implemented as a custom tag like this?
# would put this comment at top of a groovy script file
/**
* @override_class_description This is a class that blah
* blah blah does xyz
*/