|
Groovy 1.7.11 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.ast.CodeVisitorSupport
org.codehaus.groovy.ast.ClassCodeVisitorSupport
org.codehaus.groovy.transform.powerassert.StatementReplacingVisitorSupport
public abstract class StatementReplacingVisitorSupport extends ClassCodeVisitorSupport
Adds the ability to replace statements.
Method Summary | |
---|---|
Statement
|
replace(Statement stat)
|
protected void
|
replaceAll(List stats)
Visits the statements in the specified mutable list. |
protected void
|
replaceVisitedStatementWith(Statement other)
Replaces the currently visited statement with the specified statement. |
void
|
visitBlockStatement(BlockStatement stat)
|
void
|
visitCaseStatement(CaseStatement stat)
|
void
|
visitCatchStatement(CatchStatement stat)
|
void
|
visitDoWhileLoop(DoWhileStatement stat)
|
void
|
visitForLoop(ForStatement stat)
|
void
|
visitIfElse(IfStatement stat)
|
void
|
visitSwitch(SwitchStatement stat)
|
void
|
visitSynchronizedStatement(SynchronizedStatement stat)
|
void
|
visitTryCatchFinally(TryCatchStatement stat)
|
void
|
visitWhileLoop(WhileStatement stat)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
public Statement replace(Statement stat)
iter.set((T) replace(iter.next())); protected void replaceAll(List stats)
protected void replaceVisitedStatementWith(Statement other)
public void visitBlockStatement(BlockStatement stat)
} public void visitCaseStatement(CaseStatement stat)
} public void visitCatchStatement(CatchStatement stat)
} public void visitDoWhileLoop(DoWhileStatement stat)
} public void visitForLoop(ForStatement stat)
stat.setElseBlock(replace(stat.getElseBlock())); public void visitIfElse(IfStatement stat)
stat.setDefaultStatement(replace(stat.getDefaultStatement())); public void visitSwitch(SwitchStatement stat)
} public void visitSynchronizedStatement(SynchronizedStatement stat)
stat.setFinallyStatement(replace(stat.getFinallyStatement())); public void visitTryCatchFinally(TryCatchStatement stat)
} public void visitWhileLoop(WhileStatement stat)
Copyright © 2003-2010 The Codehaus. All rights reserved.