Design by Contract is a valuable design method for trusted software components.
Eiffel shows how to provide appropriate language support for it. However, no
such concepts currently exist in Java. Full integration of them into Java may
help to improve and guarantee the quality of Java classes. We briefly compare
several approaches to extend Java in this way and present our model and a
compiler that translates extended Java code into JVM byte code. Our Java
extension integrates preconditions, postconditions, and invariants as in Eiffel
while respecting the characteristics of Java. The evaluation shows that Design
by Contract can be added effciently to Java while keeping compatibility.