See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 13.2 The GrailsTypeChecked Annotation - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 2.4.3 ## 13.2 The GrailsTypeChecked Annotation #### GrailsTypeChecked The grails.compiler.GrailsTypeChecked annotation works a lot like the `GrailsCompileStatic` 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() {
            // …
        }
    }
| Quick Reference (hide)