Summary
We have covered a lot of ground in this chapter. We have now covered most of the important features of the Groovy language, and looked in depth at how some of these features can be applied to developing DSLs. We now have an appreciation of what can be achieved by using features in the MOP, and how using the MOP enables other powerful features, such as GroovyMarkup
.
Using the MOP, we have learned how we can modify our program's behavior at runtime. In the next chapter we will explore features in the Groovy language that allow us to hook in the actual compilation process. We will see how AST transformations allow us a much greater degree of control over our DSL by manipulating our program code at compile time.