jodd-proxetta/src/main/java/jodd/asm7/AnnotationWriter.java
void putAnnotations(final int attributeNameIndex, final ByteVector output) {
    int attributeLength = 2; // For num_annotations.
    int numAnnotations = 0;
    AnnotationWriter annotationWriter = this;
    AnnotationWriter firstAnnotation = null;
    while (annotationWriter != null) {
      // In case the user forgot to call visitEnd().
      annotationWriter.visitEnd();
      attributeLength += annotationWriter.annotation.length;
      numAnnotations++;
      firstAnnotation = annotationWriter;
      annotationWriter = annotationWriter.previousAnnotation;
    }
    output.putShort(attributeNameIndex);
    output.putInt(attributeLength);
    output.putShort(numAnnotations);
    annotationWriter = firstAnnotation;
    while (annotationWriter != null) {
      output.putByteArray(annotationWriter.annotation.data, 0, annotationWriter.annotation.length);
      annotationWriter = annotationWriter.nextAnnotation;
    }
  }
void putAnnotations(final int attributeNameIndex, final ByteVector output) {
    int attributeLength = 2; // For num_annotations.
    int numAnnotations = 0;
    AnnotationWriter annotationWriter = this;
    AnnotationWriter firstAnnotation = null;
    while (annotationWriter != null) {
      // In case the user forgot to call visitEnd().
      annotationWriter.visitEnd();
      attributeLength += annotationWriter.annotation.length;
      numAnnotations++;
      firstAnnotation = annotationWriter;
      annotationWriter = annotationWriter.previousAnnotation;
    }
    output.putShort(attributeNameIndex);
    output.putInt(attributeLength);
    output.putShort(numAnnotations);
    annotationWriter = firstAnnotation;
    while (annotationWriter != null) {
      output.putByteArray(annotationWriter.annotation.data, 0, annotationWriter.annotation.length);
      annotationWriter = annotationWriter.nextAnnotation;
    }
  }
void putAnnotations ( final int attributeNameIndex , final ByteVector output ) { int attributeLength = 2 ; // For num_annotations. int numAnnotations = 0 ; AnnotationWriter annotationWriter = this ; AnnotationWriter firstAnnotation = null ; while ( annotationWriter != null ) { // In case the user forgot to call visitEnd(). annotationWriter . visitEnd ( ) ; attributeLength += annotationWriter . annotation . length ; numAnnotations ++ ; firstAnnotation = annotationWriter ; annotationWriter = annotationWriter . previousAnnotation ; } output . putShort ( attributeNameIndex ) ; output . putInt ( attributeLength ) ; output . putShort ( numAnnotations ) ; annotationWriter = firstAnnotation ; while ( annotationWriter != null ) { output . putByteArray ( annotationWriter . annotation . data , 0 , annotationWriter . annotation . length ) ; annotationWriter = annotationWriter . nextAnnotation ; } }
Puts a Runtime[In]Visible[Type]Annotations attribute containing this annotations and all its
<i>predecessors</i> (see {@link #previousAnnotation} in the given ByteVector. Annotations are
put in the same order they have been visited.

@param attributeNameIndex the constant pool index of the attribute name (one of
"Runtime[In]Visible[Type]Annotations").
@param output where the attribute must be put.
Puts a Runtime [ In ] Visible [ Type ] Annotations attribute containing this annotations and all its <i > predecessors< / i > ( see { @link #previousAnnotation } in the given ByteVector . Annotations are put in the same order they have been visited .