@SuppressWarnings("unchecked")
  @Override
  public void visitSwitch(SwitchStatement stat) {
    stat.getExpression().visit(this);
    replaceAll(stat.getCaseStatements());
    stat.setDefaultStatement(replace(stat.getDefaultStatement()));
  }
Replaces the currently visited statement with the specified statement.
spock-core/src/main/java/org/spockframework/compiler/StatementReplacingVisitorSupport.java