public static void addContents(DexFile file, Annotation annotation) {
    TypeIdsSection typeIds = file.getTypeIds();
    StringIdsSection stringIds = file.getStringIds();

    typeIds.intern(annotation.getType());

    for (NameValuePair pair : annotation.getNameValuePairs()) {
      stringIds.intern(pair.getName());
      addContents(file, pair.getValue());
    }
  }
Helper for {@code addContents()} methods, which adds contents for a particular {@link
Annotation}, calling itself recursively should it encounter a nested annotation.

@param file {@code non-null;} the file to add to
@param annotation {@code non-null;} the annotation to add contents for
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/ValueEncoder.java