Package: org.codehaus.groovy.transform.tailrec

## [Groovy] Class StatementReplacer

- org.codehaus.groovy.transform.tailrec.StatementReplacer

- Tool for replacing Statement objects in an AST by other Statement instances. Within

  TailRecursive:
    it is used to swap ReturnStatements with looping back to RECUR label
  Authors:
    Johannes Link

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `int` | `closureLevel`
    `Closure<Statement>` | `replaceWith`
    `Closure<Boolean>` | `when`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `replaceIn(ASTNode root)`
    `` | `void` | `visitBlockStatement(BlockStatement block)`
    `` | `void` | `visitClosureExpression(ClosureExpression expression)`
    `` | `void` | `visitDoWhileLoop(DoWhileStatement loop)`
    `` | `void` | `visitForLoop(ForStatement forLoop)`
    `` | `void` | `visitIfElse(IfStatement ifElse)`
    `` | `void` | `visitWhileLoop(WhileStatement loop)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class CodeVisitorSupport` | `visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitListExpression, visitListOfExpressions, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop`
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Property Detail

    - #### int closureLevel

    - #### Closure<Statement> replaceWith

    - #### Closure<Boolean> when

  - ### Method Detail

    - #### void replaceIn(ASTNode root)

    - #### void visitBlockStatement(BlockStatement block)

    - #### void visitClosureExpression(ClosureExpression expression)

    - #### void visitDoWhileLoop(DoWhileStatement loop)

    - #### void visitForLoop(ForStatement forLoop)

    - #### void visitIfElse(IfStatement ifElse)

    - #### void visitWhileLoop(WhileStatement loop)