Modern Jass is an interesting open source, annotations based Design-by-Contract system for Java 6.
Annotations include:
@Invariant@Pre Precondition@Post Postconditions@SpecCase a full method specification (normal and exceptional behaviour)@Also a container for multiple specifications@Min the lower bound of a numerical value My biggest concern with this is that it makes the same mistake assertions did: it uses errors that can be be disabled at runtime where it should be using runtime exceptions. This makes it a debugging tool, but not really part of the running code.