To come (in some sort of priority order):
Verify that "pure" methods don't have any side effects.
Issue a warning if a contract is using methods that are not declared as "pure".
Logging using a plugin framework, possibly.
JVM exit on contract inconsistency. Added in 2.7.0.
Fine grained control over which contracts to include/exclude. Added in 2.7.0.
Merging of contracts, i.e. allow several contracts on the same method. Used for targets that implements an interface with e.g. a class invariant, and the
class also have a contract with a class invariant, or when a target implements two interfaces that defines methods with the same signature, and both
interfaces provides contracts for them. Added in 2.7.0.
Support for static methods. Added in 1.1.0. - Note, support for static methods where dropped in 2.0.0 in favor of proper contract inheritance,
it may be reintroduced later on. Shouldn't be a problem since static methods are not overridable. Added again in 2.7.0.
Catch Exceptions from contracts and raise them as assertion errors, so that an application won't handle contract errors by mistake.
Added in the 2.5.2 bug fix release.
Contract class names defined in the
ContractBase is now a generic class ContractBase<T> where T is the target class. Makes it possible for contracts to reference m_target without casting. Added in 2.4.0.
Made it possible to get references to private fields in the target. Added in 2.3.0.
Added pre conditions for constructors. Added in 2.3.0.
Allow contract implementations whithout constructors that take a target parameter. Added in 2.3.0.
Explicit "pure" declaration of methods using an annotation (i.e. those methods will not be instrumented with a class invariant call). Added in 2.2.0.
Automatic detection of simple getters (and marking them as "pure"). Added in 2.1.0.
Add support for contracts defined in super interfaces of interfaces that classes implements. Added in 2.1.0.
Proper contract inheritance, i.e. pre conditions may be weakened, post conditions must not be weakened, class invariants should be merged. Added in 2.0.0.
Thread safety, i.e. use ThreadLocal variables for return- and pre- values. Added in 2.0.0.
Allow contracts on Interfaces. Added in 2.0.0.
Better error handling. Added in 1.1.0.
Support for overloaded methods. Added in 1.1.0.
Logging. Added in 1.1.0.
contractClassNameattribute of the
ContractReferenceannotation does not have to be fully qualified if the contract class is implemented in the same package as the target class. Added in 2.5.0.