General

What is ContractChecker?

ContractChecker is a minimal design-by-contract tool for Java to provide protection against precondition violations, by throwing exceptions in the client code, not inside the called method.

Features

What about other design-by-contract tools? Why don't you just use them instead of developing a custom solution?

There're some other design by contract tools, as JASS , JML , or iContract .

However, the motivation to launch this project was to avoid the need of some defensive habits I was used to. However, no matter how good a tool or an extension is, you have to convince people to use it. I wanted to have something 100% transparent, that everybody understands what it does, and how it does it (but maybe the AspectJ part). It doesn't pretend to be an extension language to support design by contract in Java, as mentioned tools could be, but just a seamless integrated wizard to enforce contract protection and save lines of code.

In summary, it doesn't try to overcome any Java limitations, but instead allow a safe simplification of the code by omitting method parameter checks. Some developers just omit them from the begining, but I feel we need more robust code.

Status

Which is the current status of ContractChecker?

ContractChecker is still under development (version 0.4.5), and therefore, it doesn't implement all expected features yet. However, it's currently fully usable for ensuring precondition safety.