public void checkConstraints(Collection<ConstraintViolation> violations) { super.checkConstraints(violations); if (!this.leftHandSideIndexExpression()) { violations.add(new ConstraintViolation("leftHandSideIndexExpression", this)); } Expression index = this.getIndex(); if (index != null) { index.checkConstraints(violations); } }
public void checkConstraints(Collection<ConstraintViolation> violations) { super.checkConstraints(violations); if (!this.doStatementAssignmentsBefore()) { violations.add(new ConstraintViolation("doStatementAssignmentsBefore", this)); } if (!this.doStatementAssignmentsAfter()) { violations.add(new ConstraintViolation("doStatementAssignmentsAfter", this)); } if (!this.doStatementCondition()) { violations.add(new ConstraintViolation("doStatementCondition", this)); } if (!this.doStatementEnclosedStatements()) { violations.add(new ConstraintViolation("doStatementEnclosedStatements", this)); } Expression condition = this.getCondition(); if (condition != null) { condition.checkConstraints(violations); } Block body = this.getBody(); if (body != null) { body.checkConstraints(violations); } }