Class ClassInvariant
java.lang.Object
org.apache.groovy.contracts.domain.Assertion<ClassInvariant>
org.apache.groovy.contracts.domain.ClassInvariant
A class-invariant assertion.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClassInvariantShared invariant instance representing an unconstrained class invariant. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a class invariant that defaults totrue.ClassInvariant(BlockStatement blockStatement, BooleanExpression booleanExpression) Creates a class invariant from the supplied source block and boolean expression. -
Method Summary
Methods inherited from class org.apache.groovy.contracts.domain.Assertion
and, booleanExpression, or, originalBlockStatement, renew
-
Field Details
-
DEFAULT
Shared invariant instance representing an unconstrained class invariant.
-
-
Constructor Details
-
ClassInvariant
public ClassInvariant()Creates a class invariant that defaults totrue. -
ClassInvariant
Creates a class invariant from the supplied source block and boolean expression.- Parameters:
blockStatement- the original invariant blockbooleanExpression- the normalized invariant expression
-