static String access(ExecutableElement method) {
    Set<Modifier> mods = method.getModifiers();
    if (mods.contains(Modifier.PUBLIC)) {
      return "public ";
    } else if (mods.contains(Modifier.PROTECTED)) {
      return "protected ";
    } else {
      return "";
    }
  }
Returns an appropriate string to be used in code for the access specification of the given
method. This will be {@code public} or {@code protected} followed by a space, or the empty
string for default access.
value/src/main/java/com/google/auto/value/processor/SimpleMethod.java