Class InteractionRewriter


  • public class InteractionRewriter
    extends java.lang.Object
    Creates the AST representation of an InteractionBuilder build sequence.
    Author:
    Peter Niederwieser
    • Constructor Summary

      Constructors 
      Constructor Description
      InteractionRewriter​(IRewriteResources resources, org.codehaus.groovy.ast.expr.ClosureExpression activeWithOrMockClosure)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.codehaus.groovy.ast.stmt.ExpressionStatement rewrite​(org.codehaus.groovy.ast.stmt.ExpressionStatement stat)
      If the given statement is a valid interaction definition, returns the rewritten statement.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InteractionRewriter

        public InteractionRewriter​(IRewriteResources resources,
                                   org.codehaus.groovy.ast.expr.ClosureExpression activeWithOrMockClosure)
    • Method Detail

      • rewrite

        public org.codehaus.groovy.ast.stmt.ExpressionStatement rewrite​(org.codehaus.groovy.ast.stmt.ExpressionStatement stat)
        If the given statement is a valid interaction definition, returns the rewritten statement. If the given statement is not an interaction definition, returns null. If the given statement is an invalid interaction definition, records a compile error and returns null.