use of org.gcontracts.domain.Postcondition in project gcontracts by andresteingress.
the class EnsuresAnnotationProcessor method process.
@Override
public void process(ProcessingContextInformation processingContextInformation, Contract contract, ClassNode classNode, MethodNode methodNode, BlockStatement blockStatement, BooleanExpression booleanExpression) {
if (!processingContextInformation.isPostconditionsEnabled())
return;
if (booleanExpression == null)
return;
final List<ConstructorNode> declaredConstructors = classNode.getDeclaredConstructors();
contract.postconditions().and(methodNode, new Postcondition(blockStatement, booleanExpression, declaredConstructors.contains(methodNode)));
}
Aggregations