private void printTypeLists() throws IOException {
    if (tableOfContents.typeLists.off == -1) {
      System.out.println("No type lists");
      return;
    }
    Dex.Section in = dex.open(tableOfContents.typeLists.off);
    for (int i = 0; i < tableOfContents.typeLists.size; i++) {
      int size = in.readInt();
      System.out.print("Type list i=" + i + ", size=" + size + ", elements=");
      for (int t = 0; t < size; t++) {
        System.out.print(" " + dex.typeNames().get(in.readShort()));
      }
      if (size % 2 == 1) {
        in.readShort(); // retain alignment
      }
      System.out.println();
    }
  }
Executable that prints all indices of a dex file.
android/android_framework/dex-maker/src/main/java/com/android/dx/io/DexIndexPrinter.java