Inheritance of contracts
C4J support full contract inheritance, both for target classes and for contracts themselves. If a class is protected by a contract, all extending classes will
automatically enforce those contracts as well. Also, if a parent class is protected by a contract and an extending class is protected by another contract, the
contracts will be combined for the extending class.
Furthermore, contracts defined for super interfaces to interfaces that a class implements will also be enforced.
If contracts don't adhere to these rules, it will be discovered during run time and a warning will be printed.