src/com/google/javascript/jscomp/AbstractCommandLineRunner.java
/** Creates JS source code inputs from a list of files. */
Creates JS source code inputs from a list of files.
Creates JS source code inputs from a list of files .
@GwtIncompatible("Unnecessary")
  private List<SourceFile> createSourceInputs(
      List<JsModuleSpec> jsModuleSpecs,
      List<FlagEntry<JsSourceType>> files,
      List<JsonFileSpec> jsonFiles)
      throws IOException {
    if (isInTestMode()) {
      return inputsSupplierForTesting != null ? inputsSupplierForTesting.get()
          : null;
    }
    if (files.isEmpty() && jsonFiles == null) {
      files = Collections.singletonList(
          new FlagEntry<JsSourceType>(JsSourceType.JS, "-"));
    }
    try {
      if (jsonFiles != null) {
        return createInputs(files, jsonFiles, jsModuleSpecs);
      } else {
        return createInputs(files, true, jsModuleSpecs);
      }
    } catch (FlagUsageException e) {
      throw new FlagUsageException("Bad --js flag. " + e.getMessage());
    }
  }
@ GwtIncompatible ( "Unnecessary" ) private List < SourceFile > createSourceInputs ( List < JsModuleSpec > jsModuleSpecs , List < FlagEntry < JsSourceType > > files , List < JsonFileSpec > jsonFiles ) throws IOException { if ( isInTestMode ( ) ) { return inputsSupplierForTesting != null ? inputsSupplierForTesting . get ( ) : null ; } if ( files . isEmpty ( ) && jsonFiles == null ) { files = Collections . singletonList ( new FlagEntry < JsSourceType > ( JsSourceType . JS , "-" ) ) ; } try { if ( jsonFiles != null ) { return createInputs ( files , jsonFiles , jsModuleSpecs ) ; } else { return createInputs ( files , true , jsModuleSpecs ) ; } } catch ( FlagUsageException e ) { throw new FlagUsageException ( "Bad --js flag. " + e . getMessage ( ) ) ; } }
Creates JS source code inputs from a list of files.
Creates JS source code inputs from a list of files .
// Request to read from stdin.