Grails

Groovy annotations for ToString and EqualsAndHashCode

As I am a lazy programmer most of the time I dont implement toString and equals methods on my grails domain classes. I would like to say thanks to Groovy for helping me out and giving me a ready made recipe for this. Now I just need to annotate my class with ToString and EqualAndHashCode annotation it adds appropriate implementation of...

by Uday Pratap Singh
Tag: groovy annotations
29-Jan-2012

Grails

Groovy Category Annotation

Annotations really provides a whole new view of programming things. Groovy also provides some of its own annotations one of them is Category. Lets take an example of using it. We create a IntegerUtil class and annotate it with Category. [java] @Category(Integer) class IntegerUtil { List<Integer> multiples(Integer...

by Uday Pratap Singh
Tag: groovy annotations
31-Jul-2011