# Package org.apache.groovy.contracts

## Package org.apache.groovy.contracts Description

Provides Design by Contract (DbC) support for Groovy classes and methods. This framework allows developers to define preconditions, postconditions, and class invariants using annotations, enabling automatic runtime validation of contract constraints.

- Class Summary
  Class | Description
  --- | ---
  MethodVariantSupport | Runtime support for a method-level Decreases recursion termination measure.
  VariantSupport | Shared runtime support for Decreases termination measures, used by both the loop variant (`@Decreases` on a loop) and the recursion variant (`@Decreases` on a method, via MethodVariantSupport).
  ViolationTracker |

- Exception Summary
  Exception | Description
  --- | ---
  CircularAssertionCallException |

- Error Summary
  Error | Description
  --- | ---
  AssertionViolation |
  ClassInvariantViolation |
  LoopInvariantViolation |
  LoopVariantViolation | Thrown whenever a loop variant (decreases/increases) violation occurs.
  PostconditionViolation |
  PreconditionViolation |
  RecursionVariantViolation | Thrown when a method-level Decreases recursion termination measure fails — either a recursive re-entry did not strictly decrease the measure, or the measure became negative (not well-founded).