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.
Type | Name and description |
---|---|
private VariableReplacedListener |
listener |
private Map |
nameAndTypeMapping Nested map of variable accesses to replace e.g.: [ 'varToReplace': [name: 'newVar', type: TypeOfVar], 'varToReplace2': [name: 'newVar2', type: TypeOfVar2], ] |
Constructor and description |
---|
VariableAccessReplacer
() |
Nested map of variable accesses to replace e.g.: [ 'varToReplace': [name: 'newVar', type: TypeOfVar], 'varToReplace2': [name: 'newVar2', type: TypeOfVar2], ]
Copyright © 2003-2020 The Apache Software Foundation. All rights reserved.