Package org.apache.groovy.contracts.ast
package org.apache.groovy.contracts.ast
AST transformations for implementing Design by Contract semantics, including precondition, postcondition, and invariant validation transformations.
-
ClassesClassDescriptionBase AST transformation encapsulating all common helper methods and implementing
ASTTransformation.EvaluatesClosureExpressioninstances in annotation parameters and generates special contract closure classes from them.Handles aDecreasesannotation placed on a method (the loop case is handled byLoopVariantASTTransformation).Inherits a method-levelDecreasestermination measure onto an override that does not redeclare it — mirroring how groovy-contracts inherits@Requires/@Ensures(Liskov substitution).HandlesModifiesannotations placed on methods.Validates that@Ensurespostconditions on a method only reference fields viaold.xxxthat are declared as modifiable by@Modifies.