Main features
- no need to use preprocessors or java-agents
- primary target in unit/component tests
- contracts are defined with annotations: @Invariant, @Pre, @Post
- contracts are evaluated using reflection and JavaScript engine
- contracts can be evaluated for mock-objects
Simple example 1/2
In the following example MyManager uses interface MyInterface, but the implementor of MyManager has not honoured the contract @Pre("!=null"). (Fix for this could be e.g. using Google Guava's Strings.nullToEmpty in the callDo)... read more