private void parseFlags(ArgumentsParser parser) {

      while (parser.getNext()) {
        if (parser.isArg("--debug")) {
          debug = true;
        } else if (parser.isArg("--no-warning")) {
          warnings = false;
        } else if (parser.isArg("--verbose")) {
          verbose = true;
        } else if (parser.isArg("--verbose-dump")) {
          verboseDump = true;
        } else if (parser.isArg("--no-files")) {
          emptyOk = true;
        } else if (parser.isArg("--no-optimize")) {
          optimize = false;
        } else if (parser.isArg("--no-strict")) {
          strictNameCheck = false;
        } else if (parser.isArg("--core-library")) {
          coreLibrary = true;
        } else if (parser.isArg("--statistics")) {
          statistics = true;
        } else if (parser.isArg("--optimize-list=")) {
          if (dontOptimizeListFile != null) {
            context.err.println("--optimize-list and " + "--no-optimize-list are incompatible.");
            throw new UsageException();
          }
          optimize = true;
          optimizeListFile = parser.getLastValue();
        } else if (parser.isArg("--no-optimize-list=")) {
          if (dontOptimizeListFile != null) {
            context.err.println("--optimize-list and " + "--no-optimize-list are incompatible.");
            throw new UsageException();
          }
          optimize = true;
          dontOptimizeListFile = parser.getLastValue();
        } else if (parser.isArg("--keep-classes")) {
          keepClassesInJar = true;
        } else if (parser.isArg("--output=")) {
          outName = parser.getLastValue();
          if (new File(outName).isDirectory()) {
            jarOutput = false;
            outputIsDirectory = true;
          } else if (FileUtils.hasArchiveSuffix(outName)) {
            jarOutput = true;
          } else if (outName.endsWith(".dex") || outName.equals("-")) {
            jarOutput = false;
            outputIsDirectDex = true;
          } else {
            context.err.println("unknown output extension: " + outName);
            throw new UsageException();
          }
        } else if (parser.isArg("--dump-to=")) {
          humanOutName = parser.getLastValue();
        } else if (parser.isArg("--dump-width=")) {
          dumpWidth = Integer.parseInt(parser.getLastValue());
        } else if (parser.isArg("--dump-method=")) {
          methodToDump = parser.getLastValue();
          jarOutput = false;
        } else if (parser.isArg("--positions=")) {
          String pstr = parser.getLastValue().intern();
          if (pstr == "none") {
            positionInfo = PositionList.NONE;
          } else if (pstr == "important") {
            positionInfo = PositionList.IMPORTANT;
          } else if (pstr == "lines") {
            positionInfo = PositionList.LINES;
          } else {
            context.err.println("unknown positions option: " + pstr);
            throw new UsageException();
          }
        } else if (parser.isArg("--no-locals")) {
          localInfo = false;
        } else if (parser.isArg(NUM_THREADS_OPTION + "=")) {
          numThreads = Integer.parseInt(parser.getLastValue());
        } else if (parser.isArg(INCREMENTAL_OPTION)) {
          incremental = true;
        } else if (parser.isArg("--force-jumbo")) {
          forceJumbo = true;
        } else if (parser.isArg(MULTI_DEX_OPTION)) {
          multiDex = true;
        } else if (parser.isArg(MAIN_DEX_LIST_OPTION + "=")) {
          mainDexListFile = parser.getLastValue();
        } else if (parser.isArg(MINIMAL_MAIN_DEX_OPTION)) {
          minimalMainDex = true;
        } else if (parser.isArg("--set-max-idx-number=")) { // undocumented test option
          maxNumberOfIdxPerDex = Integer.parseInt(parser.getLastValue());
        } else if (parser.isArg(INPUT_LIST_OPTION + "=")) {
          File inputListFile = new File(parser.getLastValue());
          try {
            inputList = new ArrayList<String>();
            readPathsFromFile(inputListFile.getAbsolutePath(), inputList);
          } catch (IOException e) {
            context.err.println("Unable to read input list file: " + inputListFile.getName());
            // problem reading the file so we should halt execution
            throw new UsageException();
          }
        } else if (parser.isArg("--min-sdk-version=")) {
          String arg = parser.getLastValue();
          int value;
          try {
            value = Integer.parseInt(arg);
          } catch (NumberFormatException ex) {
            value = -1;
          }
          if (value < 1) {
            System.err.println("improper min-sdk-version option: " + arg);
            throw new UsageException();
          }
          minSdkVersion = value;
        } else if (parser.isArg("--allow-all-interface-method-invokes")) {
          allowAllInterfaceMethodInvokes = true;
        } else {
          context.err.println("unknown option: " + parser.getCurrent());
          throw new UsageException();
        }
      }
    }
Optional list containing inputs read in from a file.
android/android_framework/dex-maker/src/main/java/com/android/dx/command/dexer/Main.java