jodd-proxetta/src/main/java/jodd/asm7/Attribute.java
final int computeAttributesSize(
      final SymbolTable symbolTable,
      final byte[] code,
      final int codeLength,
      final int maxStack,
      final int maxLocals) {
    final ClassWriter classWriter = symbolTable.classWriter;
    int size = 0;
    Attribute attribute = this;
    while (attribute != null) {
      symbolTable.addConstantUtf8(attribute.type);
      size += 6 + attribute.write(classWriter, code, codeLength, maxStack, maxLocals).length;
      attribute = attribute.nextAttribute;
    }
    return size;
  }
final int computeAttributesSize(
      final SymbolTable symbolTable,
      final byte[] code,
      final int codeLength,
      final int maxStack,
      final int maxLocals) {
    final ClassWriter classWriter = symbolTable.classWriter;
    int size = 0;
    Attribute attribute = this;
    while (attribute != null) {
      symbolTable.addConstantUtf8(attribute.type);
      size += 6 + attribute.write(classWriter, code, codeLength, maxStack, maxLocals).length;
      attribute = attribute.nextAttribute;
    }
    return size;
  }
Returns the total size in bytes of all the attributes in the attribute list that begins with
this attribute. This size includes the 6 header bytes (attribute_name_index and
attribute_length) per attribute. Also adds the attribute type names to the constant pool.

@param symbolTable where the constants used in the attributes must be stored.
@param code the bytecode of the method corresponding to these code attributes, or {@literal
null} if they are not code attributes. Corresponds to the 'code' field of the Code
attribute.
@param codeLength the length of the bytecode of the method corresponding to these code
attributes, or 0 if they are not code attributes. Corresponds to the 'code_length' field of
the Code attribute.
@param maxStack the maximum stack size of the method corresponding to these code attributes, or
-1 if they are not code attributes.
@param maxLocals the maximum number of local variables of the method corresponding to these
code attributes, or -1 if they are not code attribute.
@return the size of all the attributes in this attribute list. This size includes the size of
the attribute headers.