Package org.spockframework.compiler
Class InteractionRewriter
java.lang.Object
org.spockframework.compiler.InteractionRewriter
Creates the AST representation of an InteractionBuilder build sequence.
- Author:
- Peter Niederwieser
-
Constructor Summary
ConstructorsConstructorDescriptionInteractionRewriter
(IRewriteResources resources, org.codehaus.groovy.ast.expr.ClosureExpression activeWithOrMockClosure) -
Method Summary
Modifier and TypeMethodDescriptionorg.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.
-
Constructor Details
-
InteractionRewriter
public InteractionRewriter(IRewriteResources resources, org.codehaus.groovy.ast.expr.ClosureExpression activeWithOrMockClosure)
-
-
Method Details
-
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.
-