Class Postcondition
java.lang.Object
org.apache.groovy.contracts.domain.Assertion<Postcondition>
org.apache.groovy.contracts.domain.Postcondition
A post-condition assertion.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a postcondition that defaults totrue.Postcondition(BlockStatement blockStatement, BooleanExpression booleanExpression, boolean isPartOfConstructor) Creates a postcondition from the supplied source block and boolean expression. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether this postcondition was declared for a constructor.Methods inherited from class org.apache.groovy.contracts.domain.Assertion
and, booleanExpression, or, originalBlockStatement, renew
-
Constructor Details
-
Postcondition
public Postcondition()Creates a postcondition that defaults totrue. -
Postcondition
public Postcondition(BlockStatement blockStatement, BooleanExpression booleanExpression, boolean isPartOfConstructor) Creates a postcondition from the supplied source block and boolean expression.- Parameters:
blockStatement- the original postcondition blockbooleanExpression- the normalized postcondition expressionisPartOfConstructor- whether the postcondition belongs to a constructor
-
-
Method Details
-
isPartOfConstructor
public boolean isPartOfConstructor()Indicates whether this postcondition was declared for a constructor.- Returns:
trueif the postcondition belongs to a constructor
-