Package: org.codehaus.groovy.transform.tailrec

## [Java] Class UsedVariableTracker

- org.codehaus.groovy.transform.tailrec.UsedVariableTracker

- All Implemented Interfaces and Traits:
    VariableReplacedListener

      public class UsedVariableTracker
      extends Object
      implements VariableReplacedListener

  Tracks replacement variables that are actually used while rewriting expressions.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Set<String>` | `getUsedVariableNames()` Returns the names of replacement variables that were referenced.
    `` | `public void` | `variableReplaced(VariableExpression oldVar, VariableExpression newVar)` * Called after a variable expression has been replaced. * * Parameters: `oldVar` - the original variable expression * `newVar` - the replacement variable expression

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### public Set<String> getUsedVariableNames()

      Returns the names of replacement variables that were referenced.

      Returns:
        the used replacement variable names

    - #### public void variableReplaced(VariableExpression oldVar, VariableExpression newVar)

      * Called after a variable expression has been replaced. * *

      Parameters:
        `oldVar` - the original variable expression *
        `newVar` - the replacement variable expression