Package org.apache.groovy.contracts.util
Class ExpressionUtils
java.lang.Object
org.apache.groovy.contracts.util.ExpressionUtils
Internal utility class for extracting a boolean expression from the given expression or statement.
- See Also:
-
ClosureExpressionBooleanExpression
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.codehaus.groovy.ast.expr.BooleanExpressiongetBooleanExpression(List<org.codehaus.groovy.ast.expr.BooleanExpression> booleanExpressions) static List<org.codehaus.groovy.ast.expr.BooleanExpression>getBooleanExpression(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression) Returns allBooleanExpressioninstances found in the givenClosureExpression.static List<org.codehaus.groovy.ast.expr.BooleanExpression>getBooleanExpressionsFromAssertionStatements(org.codehaus.groovy.ast.stmt.BlockStatement blockStatement) Returns allBooleanExpressioninstances found in the givenBlockStatement.
-
Method Details
-
getBooleanExpression
public static List<org.codehaus.groovy.ast.expr.BooleanExpression> getBooleanExpression(org.codehaus.groovy.ast.expr.ClosureExpression closureExpression) Returns allBooleanExpressioninstances found in the givenClosureExpression. -
getBooleanExpressionsFromAssertionStatements
public static List<org.codehaus.groovy.ast.expr.BooleanExpression> getBooleanExpressionsFromAssertionStatements(org.codehaus.groovy.ast.stmt.BlockStatement blockStatement) Returns allBooleanExpressioninstances found in the givenBlockStatement. -
getBooleanExpression
public static org.codehaus.groovy.ast.expr.BooleanExpression getBooleanExpression(List<org.codehaus.groovy.ast.expr.BooleanExpression> booleanExpressions)
-