private void transformAnnotationSet(IndexMap indexMap, Dex.Section setIn) {
    contentsOut.annotationSets.size++;
    annotationSetOut.assertFourByteAligned();
    indexMap.putAnnotationSetOffset(setIn.getPosition(), annotationSetOut.getPosition());

    int size = setIn.readInt();
    annotationSetOut.writeInt(size);

    for (int j = 0; j < size; j++) {
      annotationSetOut.writeInt(indexMap.adjustAnnotation(setIn.readInt()));
    }
  }
Transform all annotations on a single type, member or parameter.
android/android_framework/dex-maker/src/main/java/com/android/dx/merge/DexMerger.java