code: int writeFlagAttrs(long flags) {
          int acount = 0;
          if ((flags & DEPRECATED) != 0) {
              int alenIdx = writeAttr(names.Deprecated);
              endAttr(alenIdx);
              acount++;
          }
          return acount;
      }
docs: Write flag attributes; return number of attributes written.