VariableAccessReplacer (Groovy 5.0.6)

Package: org.codehaus.groovy.transform.tailrec

## [Java] Class VariableAccessReplacer

- org.codehaus.groovy.transform.tailrec.VariableAccessReplacer

-     public class VariableAccessReplacer
      extends Object

  Replace all access to variables and args by new variables. The variable names to replace as well as their replacement name and type have to be configured in nameAndTypeMapping before calling replaceIn().

  The VariableReplacedListener can be set if clients want to react to variable replacement.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `VariableAccessReplacer(Map<String, Map> nameAndTypeMapping)`
    `VariableAccessReplacer(Map<String, Map> nameAndTypeMapping, VariableReplacedListener listener)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public Boolean` | `doCall(VariableExpression expr)`
    `` | `public VariableExpression` | `doCall(VariableExpression expr)`
    `` | `public VariableReplacedListener` | `getListener()`
    `` | `public void` | `replaceIn(ASTNode root)`
    `` | `public void` | `setListener(VariableReplacedListener listener)`
    `` | `public void` | `setNameAndTypeMapping(Map<String, Map> nameAndTypeMapping)`

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### public VariableAccessReplacer(Map<String, Map> nameAndTypeMapping)

    - #### public VariableAccessReplacer(Map<String, Map> nameAndTypeMapping, VariableReplacedListener listener)

  - ### Method Detail

    - #### public Boolean doCall(VariableExpression expr)

    - #### public VariableExpression doCall(VariableExpression expr)

    - #### public VariableReplacedListener getListener()

    - #### public void replaceIn(ASTNode root)

    - #### public void setListener(VariableReplacedListener listener)

    - #### public void setNameAndTypeMapping(Map<String, Map> nameAndTypeMapping)