public class StatementReplacer extends CodeVisitorSupport
Tool for replacing Statement objects in an AST by other Statement instances.
Within
| Constructor and description | 
|---|
| StatementReplacer(Closure<Boolean> when, Closure<Statement> replaceWith) | 
| Type Params | Return Type | Name and description | 
|---|---|---|
|  | public int | getClosureLevel() | 
|  | public Closure<Statement> | getReplaceWith() | 
|  | public Closure<Boolean> | getWhen() | 
|  | public void | replaceIn(ASTNode root) | 
|  | public void | setClosureLevel(int closureLevel) | 
|  | public void | setReplaceWith(Closure<Statement> replaceWith) | 
|  | public void | setWhen(Closure<Boolean> when) | 
|  | public void | visitBlockStatement(BlockStatement block) | 
|  | public void | visitClosureExpression(ClosureExpression expression) | 
|  | public void | visitDoWhileLoop(DoWhileStatement loop) | 
|  | public void | visitForLoop(ForStatement forLoop) | 
|  | public void | visitIfElse(IfStatement ifElse) | 
|  | public void | visitWhileLoop(WhileStatement loop) | 
Copyright © 2003-2025 The Apache Software Foundation. All rights reserved.