public class SpecRewriter extends AbstractSpecVisitor implements IRewriteResources
Constructor and Description |
---|
SpecRewriter(AstNodeCache nodeCache,
SourceLookup lookup,
ErrorReporter errorReporter) |
Modifier and Type | Method and Description |
---|---|
org.codehaus.groovy.ast.expr.VariableExpression |
captureOldValue(org.codehaus.groovy.ast.expr.Expression oldValue) |
void |
defineValueRecorder(java.util.List<org.codehaus.groovy.ast.stmt.Statement> stats) |
AstNodeCache |
getAstNodeCache() |
Block |
getCurrentBlock() |
Method |
getCurrentMethod() |
Spec |
getCurrentSpec() |
ErrorReporter |
getErrorReporter() |
org.codehaus.groovy.ast.expr.VariableExpression |
getMockControllerRef() |
java.lang.String |
getSourceText(org.codehaus.groovy.ast.ASTNode node) |
void |
visitAnyBlock(Block block) |
void |
visitCleanupBlock(CleanupBlock block) |
void |
visitExpectBlock(ExpectBlock block) |
void |
visitField(Field field) |
void |
visitMethod(Method method) |
void |
visitMethodAgain(Method method) |
void |
visitSpec(Spec spec) |
void |
visitSpecAgain(Spec spec) |
void |
visitThenBlock(ThenBlock block) |
visitAnonymousBlock, visitSetupBlock, visitWhenBlock, visitWhereBlock
public SpecRewriter(AstNodeCache nodeCache, SourceLookup lookup, ErrorReporter errorReporter)
public void visitSpec(Spec spec)
visitSpec
in interface ISpecVisitor
visitSpec
in class AbstractSpecVisitor
public void visitSpecAgain(Spec spec) throws java.lang.Exception
visitSpecAgain
in interface ISpecVisitor
visitSpecAgain
in class AbstractSpecVisitor
java.lang.Exception
public void visitField(Field field)
visitField
in interface ISpecVisitor
visitField
in class AbstractSpecVisitor
public void visitMethod(Method method)
visitMethod
in interface ISpecVisitor
visitMethod
in class AbstractSpecVisitor
public void visitMethodAgain(Method method)
visitMethodAgain
in interface ISpecVisitor
visitMethodAgain
in class AbstractSpecVisitor
public void visitAnyBlock(Block block)
visitAnyBlock
in interface ISpecVisitor
visitAnyBlock
in class AbstractSpecVisitor
public void visitExpectBlock(ExpectBlock block)
visitExpectBlock
in interface ISpecVisitor
visitExpectBlock
in class AbstractSpecVisitor
public void visitThenBlock(ThenBlock block)
visitThenBlock
in interface ISpecVisitor
visitThenBlock
in class AbstractSpecVisitor
public void visitCleanupBlock(CleanupBlock block)
visitCleanupBlock
in interface ISpecVisitor
visitCleanupBlock
in class AbstractSpecVisitor
public Spec getCurrentSpec()
getCurrentSpec
in interface IRewriteResources
public Method getCurrentMethod()
getCurrentMethod
in interface IRewriteResources
public Block getCurrentBlock()
getCurrentBlock
in interface IRewriteResources
public void defineValueRecorder(java.util.List<org.codehaus.groovy.ast.stmt.Statement> stats)
defineValueRecorder
in interface IRewriteResources
public org.codehaus.groovy.ast.expr.VariableExpression captureOldValue(org.codehaus.groovy.ast.expr.Expression oldValue)
captureOldValue
in interface IRewriteResources
public org.codehaus.groovy.ast.expr.VariableExpression getMockControllerRef()
getMockControllerRef
in interface IRewriteResources
public AstNodeCache getAstNodeCache()
getAstNodeCache
in interface IRewriteResources
public java.lang.String getSourceText(org.codehaus.groovy.ast.ASTNode node)
getSourceText
in interface IRewriteResources
public ErrorReporter getErrorReporter()
getErrorReporter
in interface IRewriteResources
Copyright © 2012. All rights reserved