private int determineVisibilityForFinalFieldAccessor(Field field) {
    if (field.getOwner() == null) { // true field
      return AstUtil.getVisibility(field.getAst());
    } else { // property
      return Opcodes.ACC_PUBLIC;
    }
  }
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