code: void writeMethod(MethodSymbol m) {
          int flags = adjustFlags(m.flags());
          databuf.appendChar(flags);
          if (dumpMethodModifiers) {
              PrintWriter pw = log.getWriter(Log.WriterKind.ERROR);
              pw.println("METHOD  " + fieldName(m));
              pw.println("---" + flagNames(m.flags()));
          }
          databuf.appendChar(pool.put(fieldName(m)));
          databuf.appendChar(pool.put(typeSig(m.externalType(types))));
          int acountIdx = beginAttrs();
          int acount = 0;
          if (m.code != null) {
              int alenIdx = writeAttr(names.Code);
              writeCode(m.code);
              m.code = null; // to conserve space
              endAttr(alenIdx);
              acount++;
          }
          List<Type> thrown = m.erasure(types).getThrownTypes();
          if (thrown.nonEmpty()) {
              int alenIdx = writeAttr(names.Exceptions);
              databuf.appendChar(thrown.length());
              for (List<Type> l = thrown; l.nonEmpty(); l = l.tail)
                  databuf.appendChar(pool.put(l.head.tsym));
              endAttr(alenIdx);
              acount++;
          }
          if (m.defaultValue != null) {
              int alenIdx = writeAttr(names.AnnotationDefault);
              m.defaultValue.accept(awriter);
              endAttr(alenIdx);
              acount++;
          }
          if (options.isSet(PARAMETERS))
              acount += writeMethodParametersAttr(m);
          acount += writeMemberAttrs(m);
          acount += writeParameterAttrs(m);
          endAttrs(acountIdx, acount);
      }
docs: Write method symbol, entering all references into constant pool.