gcontracts Status UpdateI am currently working on the gcontracts 1.0.1 release . Apart from bug fixes, that version contains an important feature you might have been tumbled over: class invariant checking on Groovy bean properties. Groovy beans support a very simple syntax to declare properties . E.g. adding a property
Personclass is as simple as typing: Compared to its Java equivalent that is as simple as it can get. Up to now, gcontracts injected class invariants only in explicitly declared setter methods, but users reported the need for class invariant injection on writeable POGO properties. Today, i am glad to tell you that gcontracts class invariant injection mechanisms now works with POGO properties. Whenever a class declares an invariant, that invariant is injected in every dynamically generated setter method of that class. E.g. a class invariant like, causes a
java.lang.AssertionErrorwhenever is called. Support for class invariant injection in POGO properties is currently available in github's Master branch and will be part of gcontracts 1.0.1.
 Groovy Beans