Interface Contract

All Known Subinterfaces:
Abelian, TypeSafeEnum
All Known Implementing Classes:

public interface Contract

Marker Interface: Contract
Contracts are interface-like constraints on a class that must be implemented by programming conventions since the Java language provides no mechanism to declare these constraints. By convention, classes may publish their "pledges" to abide by the contract conventions by implementing the marker interface associated with that contract. These marker interfaces all extend this root marker interface. While the code may or may not actually use the marker interfaces at runtime, this marker interface mechanism provides as a side effect a very good mechanism to document the contracts via JavaDoc in that it allows both contract definition AND easy reference from each class to these contract definitions because JavaDoc produces links to all app-level interfaces implemented in the class's JavaDoc page.