Class UsedVariableTracker
java.lang.Object
org.codehaus.groovy.transform.tailrec.UsedVariableTracker
- All Implemented Interfaces:
VariableReplacedListener
Tracks replacement variables that are actually used while rewriting expressions.
-
Field Summary
Fields inherited from interface org.codehaus.groovy.transform.tailrec.VariableReplacedListener
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the names of replacement variables that were referenced.voidvariableReplaced(VariableExpression oldVar, VariableExpression newVar) Called after a variable expression has been replaced.
-
Constructor Details
-
UsedVariableTracker
public UsedVariableTracker()
-
-
Method Details
-
variableReplaced
Called after a variable expression has been replaced.- Specified by:
variableReplacedin interfaceVariableReplacedListener- Parameters:
oldVar- the original variable expressionnewVar- the replacement variable expression
-
getUsedVariableNames
Returns the names of replacement variables that were referenced.- Returns:
- the used replacement variable names
-