Skip to content

using_groovy

Bill Majurski edited this page Jun 21, 2016 · 1 revision

Using Groovy in toolkit development

This article documents the current best practices for using Groovy in toolkit development.

TypeChecked

All Groovy class should be declared as statically type checked. Do this by annotating classes with the @TypeChecked annotation.

@TypeChecked
public class MyClass {
}

This provides no extra safety when working in Intellij. Intellij has its own way of indicating a problem. It is a bit subtle but it does help. This annotation is processed by the Groovy compiler used by Maven. So if you are having problems with your code and think it might be a type problem, run a Maven build on your module.

There are some Groovy facilities that are not available when using @TypeChecked.
The only way to understand what is usable and what is not is to build code and occasionally run the module build from Maven. This will give you the feedback.

Clone this wiki locally