private void handleSharedField(Field field) {
    changeSharedFieldInternalName(field);
    createSharedFieldGetter(field);
    if (!field.getAst().isFinal()) {
      createSharedFieldSetter(field);
    }
    moveSharedFieldInitializer(field);
    makeSharedFieldProtectedAndVolatile(field);
    AstUtil.setFinal(field.getAst(), false);
  }
A Spec visitor responsible for most of the rewriting of a Spec's AST.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/SpecRewriter.java