examples package: Using Gloop annotations in Groovy
It is important to document your services so other developers know their purpose and how they should be used. Groovy services can be called in Gloop but comments in Groovy do not get carried over to the Gloop development environment easily. To make this possible, you must decorate your Groovy code with Gloop annotations.
Invoking Groovy in Gloop
examples package contains services that demonstrate how you can call Groovy in
Gloop and vice versa.
examples package includes
gloopDocs.GloopDocsDemo.groovy, a Groovy service whose methods are
annotated with Gloop annotations so that their documentation is still visible in Gloop. It shows the use of the
following Gloop annotations:
||Use this annotation to add a method or service-wide comment.|
||Use this annotation to document method parameters and return values in detail.|
||Use this to hide a Groovy method from Gloop.|
||Use this annotation to describe what a method accepts or returns. This works like
Please see the following articles for more information:
To double-check if the annotations work, create a new Gloop service and call the
GloopDocsDemo.groovy in that service by dragging and dropping
GloopDocsDemo.groovy's methods from the
Coder Navigator view to the Gloop step editor1.
Can all Groovy methods be dragged and dropped?
As long as the Groovy methods are
static, they can be dragged and dropped from the Coder Navigator.
You must expand
GloopDocsDemo.groovy's tree in the Coder Navigator view to do this. ↩