void putMethodInfo(final ByteVector output) {
        int mask = 0;
        output.putShort(accessFlags & ~mask).putShort(nameIndex).putShort(descriptorIndex);
        // For ease of reference, we use here the same attribute order as in Section 4.7 of the JVMS.
        int attributeCount = 0;
        if (code.length > 0) {
            ++attributeCount;
        }
        // For ease of reference, we use here the same attribute order as in Section 4.7 of the JVMS.
        output.putShort(attributeCount);
        if (code.length > 0) {
            // 2, 2, 4 and 2 bytes respectively for max_stack, max_locals, code_length and
            // attributes_count, plus the bytecode and the exception table.
            int size = 10 + code.length + 2;
            int codeAttributeCount = 0;
            if (stackMapTableEntries != null) {
                // 6 header bytes and 2 bytes for number_of_entries.
                size += 8 + stackMapTableEntries.length;
                ++codeAttributeCount;
            }
            output
                    .putShort(symbolTable.addConstantUtf8(Constants.CODE))
                    .putInt(size)
                    .putShort(maxStack)
                    .putShort(maxLocals)
                    .putInt(code.length)
                    .putByteArray(code.data, 0, code.length);
            output.putShort(0); // putExceptionTable
            output.putShort(codeAttributeCount);
            if (stackMapTableEntries != null) {
                boolean useStackMapTable = true;
                output
                        .putShort(
                                symbolTable.addConstantUtf8(
                                        Constants.STACK_MAP_TABLE))
                        .putInt(2 + stackMapTableEntries.length)
                        .putShort(stackMapTableNumberOfEntries)
                        .putByteArray(stackMapTableEntries.data, 0, stackMapTableEntries.length);
            }
        }
    }
Puts the content of the method_info JVMS structure generated by this MethodWriter into the
given ByteVector.

@param output where the method_info structure must be put.
core/src/main/java/com/alibaba/fastjson2/internal/asm/MethodWriter.java