private int runMonoDex() throws IOException {

    File incrementalOutFile = null;
    if (args.incremental) {
      if (args.outName == null) {
        context.err.println("error: no incremental output name specified");
        return -1;
      }
      incrementalOutFile = new File(args.outName);
      if (incrementalOutFile.exists()) {
        minimumFileAge = incrementalOutFile.lastModified();
      }
    }

    if (!processAllFiles()) {
      return 1;
    }

    if (args.incremental && !anyFilesProcessed) {
      return 0; // this was a no-op incremental build
    }

    // this array is null if no classes were defined
    byte[] outArray = null;

    if (!outputDex.isEmpty() || (args.humanOutName != null)) {
      outArray = writeDex(outputDex);

      if (outArray == null) {
        return 2;
      }
    }

    if (args.incremental) {
      outArray = mergeIncremental(outArray, incrementalOutFile);
    }

    outArray = mergeLibraryDexBuffers(outArray);

    if (args.jarOutput) {
      // Effectively free up the (often massive) DexFile memory.
      outputDex = null;

      if (outArray != null) {
        outputResources.put(DexFormat.DEX_IN_JAR_NAME, outArray);
      }
      if (!createJar(args.outName)) {
        return 3;
      }
    } else if (outArray != null && args.outName != null) {
      OutputStream out = openOutput(args.outName);
      out.write(outArray);
      closeOutput(out);
    }

    return 0;
  }
Returns the "fixed" version of a given file path, suitable for use as a path within a {@code
.jar} file and for checking against a classfile-internal "this class" name. This looks for the
last instance of the substring {@code "/./"} within the path, and if it finds it, it takes the
portion after to be the fixed path. If that isn't found but the path starts with {@code "./"},
then that prefix is removed and the rest is return. If neither of these is the case, this
method returns its argument.

@param path {@code non-null;} the path to "fix"
@return {@code non-null;} the fixed version (which might be the same as the given {@code path})
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java