Package groovy.contracts
package groovy.contracts
Design-by-contract (DbC) support with compile-time assertion generation.
@Requires (precondition),
@Ensures (postcondition),
@Invariant (class invariant).
Postconditions can access result and old() values.
-
Annotation InterfacesClassDescriptionPackage-level and class-level annotation indicating that the package is enabled for class-invariants, pre- and post-conditions.Specifies a termination measure for a loop.Represents a method postcondition.Represents multiple postconditions.Represents a class-invariant or a loop invariant.Represents multiple invariantsDeclares the frame condition for a method: the set of fields and parameters that the method is allowed to modify.Container for multiple
Modifiesannotations on the same method.Represents a method precondition.Represents multiple preconditions.