private void rotateDexFile() {
    if (outputDex != null) {
      if (dexOutPool != null) {
        dexOutputFutures.add(dexOutPool.submit(new DexWriter(outputDex)));
      } else {
        dexOutputArrays.add(writeDex(outputDex));
      }
    }

    createDexFile();
  }
Constructs the output {@link DexFile}, fill it in with all the specified classes, and populate
the resources map if required.

@return whether processing was successful
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java