How does one look up documentation for dynamic methods and or dynamic objects in Grails?

130 views Asked by At

I'm familiar with the concept that dynamic methods are added via AOP to domain objects in Grails. But since they're dynamic, how is it that you find the documentation to them?

It wouldn't be obvious where to look for the documentation for these methods even if I knew what Interceptor classes might apply the methods to the domain objects...

2

There are 2 answers

0
Srinath Anantha On BEST ANSWER

There is "Grails Runtime Docs" plugin ( http://grails.org/plugin/grails-runtime-docs ) which will generate the groovy documentation from runtime also including the dynamic methods. It will add "Dynamic Method Summary" & "Dynamic Method Detail" in the generated html docs which provide their source information. The classes are also categorized into Controllers, Commands, Domains, Services and Tag Libraries. Note: I'm a grails developer and contributed this open-source plugin to Grails myself. Hope you find it useful.

2
dbrin On

Behold the Grails Docs! http://grails.org/doc/latest/ On the right side you have a quick reference that lists among other things dynamic methods added to Domain Classes. It's a good read, enjoy :)