Groovy provides many metaprogramming hooks for changing the runtime behavior of classes and objects. In addition, it provides hooks into Groovy's compilation process so that you can make changes to the language at compile time.
The hook for accessing this capability is via annotations. In your Groovy code you will make use of one of more annotations. Behind the scenes, an AST processor relevant to the annotation you are using is inserted into the compiler phases at the appropriate point. You can explore some of the more popular Annotations below:
Labels