Package org.apache.groovy.contracts.generation
package org.apache.groovy.contracts.generation
-
ClassDescriptionCentral place to create
AssertStatement
instances in groovy-contracts.Replaces a givenReturnStatement
with the appropriate assertion call statement and returns a result variable expression.Replaces a givenReturnStatement
with the appropriate assertion call statement and returns a result variable expression.Collects allReturnStatement
instances from a given code block.Base class for groovy-contracts code generators.Functions in this class are used to determine whether a certain AST node fulfills certain assertion requirements.Code generator for class invariants.Handles-ea
and-da
runtime input arguments for enabling and disabling contract elements.Keeps track of contract executions to avoid cyclic contract checks.Central place where code generation for the old closure variable takes place.Code generator for postconditions.Code generator for preconditions.Creates a try-catch block around a givenAssertStatement
and catches a PowerAssertionError to reuse the generated visual output.