# Package org.codehaus.groovy.transform.tailrec

## Package org.codehaus.groovy.transform.tailrec Description

Tail recursion optimization. Converts tail-recursive calls into loops.

- Interface Summary
  Interface | Description
  --- | ---
  VariableReplacedListener | Receives notifications whenever a variable expression is replaced.

- Class Summary
  Class | Description
  --- | ---
  AstHelper | Helping to create a few standard AST constructs
  CollectRecursiveCalls | Collect all recursive calls within method
  HasRecursiveCalls | Check if there are any recursive calls in a method
  InWhileLoopWrapper | Wrap the body of a method in a while loop, nested in a try-catch.
  RecursivenessTester | Test if a method call is recursive if called within a given method node.
  ReturnAdderForClosures | Adds explicit return statements to implicit return points in a closure.
  ReturnStatementToIterationConverter | Translates all return statements into an invocation of the next iteration.
  StatementReplacer | Tool for replacing Statement objects in an AST by other Statement instances.
  TailRecursiveASTTransformation | Handles generation of code for the TailRecursive: annotation.
  TernaryToIfStatementConverter | Since a ternary statement has more than one exit point tail-recursiveness testing cannot be easily done.
  UsedVariableTracker | Tracks replacement variables that are actually used while rewriting expressions.
  VariableAccessReplacer | Replace all access to variables and args by new variables.
  VariableExpressionReplacer | Tool for replacing VariableExpression instances in an AST by other VariableExpression instances.
  VariableExpressionTransformer | An expression transformer used in the process of replacing the access to variables

- Exception Summary
  Exception | Description
  --- | ---
  GotoRecurHereException | Exception will be thrown by recursive calls in closures and caught in while loop to continue to LOOP_LABEL