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 and description |
---|
VariableAccessReplacer(Map<String, Map> nameAndTypeMapping) |
VariableAccessReplacer(Map<String, Map> nameAndTypeMapping, VariableReplacedListener listener) |
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) |
Copyright © 2003-2024 The Apache Software Foundation. All rights reserved.