Class DeepBlockRewriter

  • All Implemented Interfaces:
    org.codehaus.groovy.ast.GroovyClassVisitor, org.codehaus.groovy.ast.GroovyCodeVisitor

    public class DeepBlockRewriter
    extends AbstractDeepBlockRewriter
    Walks the statement and expression tree to: - rewrite explicit conditions, - rewrite interactions, - rewrite core language primitives (members of class Specification) - Forbid Also records whether conditions and interactions were found.
    Author:
    Peter Niederwieser
    • Constructor Detail

    • Method Detail

      • visitAssertStatement

        public void visitAssertStatement​(org.codehaus.groovy.ast.stmt.AssertStatement stat)
        Specified by:
        visitAssertStatement in interface org.codehaus.groovy.ast.GroovyCodeVisitor
        Overrides:
        visitAssertStatement in class org.codehaus.groovy.ast.ClassCodeVisitorSupport
      • visitBlockStatement

        public void visitBlockStatement​(org.codehaus.groovy.ast.stmt.BlockStatement stat)
        Specified by:
        visitBlockStatement in interface org.codehaus.groovy.ast.GroovyCodeVisitor
        Overrides:
        visitBlockStatement in class StatementReplacingVisitorSupport
      • visitDeclarationExpression

        public void visitDeclarationExpression​(org.codehaus.groovy.ast.expr.DeclarationExpression expr)
        Specified by:
        visitDeclarationExpression in interface org.codehaus.groovy.ast.GroovyCodeVisitor
        Overrides:
        visitDeclarationExpression in class org.codehaus.groovy.ast.ClassCodeVisitorSupport
      • isImplicitCondition

        public static boolean isImplicitCondition​(org.codehaus.groovy.ast.stmt.Statement stat)