Design By Contract In Java
Small awk-based two-phases DBC implpementation.
-
dbcj-parse.awk
retrieve all contracts from given Java files. Contracts are written in temporary direcory and are ready to use during merge stage -
dbcj-merge.awk
merges given Java files with contract that have been prepared by previous stage. Result is written to stdout and can be redirected to file in order to compile -
dbcj.mak
example Makefile that compiles contracted files -
Stack.java
example interface with contracts used to show how inheritance of contracts works -
ArrayStack.java
derived class - all contracts and invariants inherited from base class