1 46 package org.codehaus.groovy.ast.stmt; 47 48 import org.codehaus.groovy.ast.GroovyCodeVisitor; 49 import org.codehaus.groovy.ast.expr.BooleanExpression; 50 import org.codehaus.groovy.ast.expr.ConstantExpression; 51 import org.codehaus.groovy.ast.expr.Expression; 52 53 62 public class AssertStatement extends Statement { 63 64 private BooleanExpression booleanExpression; 65 private Expression messageExpression; 66 67 public AssertStatement(BooleanExpression booleanExpression) { 68 this(booleanExpression, ConstantExpression.NULL); 69 } 70 71 public AssertStatement(BooleanExpression booleanExpression, Expression messageExpression) { 72 this.booleanExpression = booleanExpression; 73 this.messageExpression = messageExpression; 74 } 75 76 public void visit(GroovyCodeVisitor visitor) { 77 visitor.visitAssertStatement(this); 78 } 79 80 public Expression getMessageExpression() { 81 return messageExpression; 82 } 83 84 public BooleanExpression getBooleanExpression() { 85 return booleanExpression; 86 } 87 } 88 | Popular Tags |