14.2 The GrailsTypeChecked Annotation - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.1
14.2 The GrailsTypeChecked Annotation
GrailsTypeChecked
The grails.compiler.GrailsTypeChecked annotation works a lot like theGrailsCompileStatic
annotation except that it only enables static type checking, not static compilation. This affords compile time feedback for expressions which cannot be validated statically at compile time while still leaving dynamic dispatch in place for the class.import grails.compiler.GrailsTypeChecked@GrailsTypeChecked class SomeClass { // all of the code in this class will be statically type // checked and will be dynamically dispatched at runtime def methodOne() { // … } def methodTwo() { // … } def methodThree() { // … } }