(
compiler: string,
options: string[],
inputFilename: string,
execOptions: ExecutionOptionsWithEnv,
filters?: ParseFiltersAndOutputOptions,
)
| 75 | } |
| 76 | |
| 77 | override async runCompiler( |
| 78 | compiler: string, |
| 79 | options: string[], |
| 80 | inputFilename: string, |
| 81 | execOptions: ExecutionOptionsWithEnv, |
| 82 | filters?: ParseFiltersAndOutputOptions, |
| 83 | ): Promise<CompilationResult> { |
| 84 | if (!execOptions) { |
| 85 | execOptions = this.getDefaultExecOptions(); |
| 86 | } |
| 87 | |
| 88 | if (!execOptions.customCwd) { |
| 89 | execOptions.customCwd = path.dirname(inputFilename); |
| 90 | } |
| 91 | |
| 92 | // The items in 'options' before the source file are user inputs. |
| 93 | const sourceFileOptionIndex = options.findIndex(option => { |
| 94 | return option.endsWith('.java'); |
| 95 | }); |
| 96 | const userOptions = options.slice(0, sourceFileOptionIndex); |
| 97 | const javaOptions = _.compact([...this.getClasspathArgument(), ...userOptions, inputFilename]); |
| 98 | const result = await this.exec(compiler, javaOptions, execOptions); |
| 99 | return { |
| 100 | ...this.transformToCompilationResult(result, inputFilename), |
| 101 | languageId: this.getCompilerResultLanguageId(filters), |
| 102 | instructionSet: this.getInstructionSetFromCompilerArgs(options), |
| 103 | }; |
| 104 | } |
| 105 | |
| 106 | async readdir(dirPath: string): Promise<string[]> { |
| 107 | // Separate method allows override to find classfiles |
nothing calls this directly
no test coverage detected