use of com.google.errorprone.MaskedClassLoader.MaskedFileManager in project error-prone by google.
the class BaseErrorProneCompiler method run.
public Result run(String[] argv) {
try {
argv = CommandLine.parse(argv);
} catch (IOException e) {
throw new IOError(e);
}
List<String> javacOpts = new ArrayList<>();
List<String> sources = new ArrayList<>();
for (String arg : argv) {
// TODO(cushon): is there a better way to categorize javacopts?
if (!arg.startsWith("-") && arg.endsWith(".java")) {
sources.add(arg);
} else {
javacOpts.add(arg);
}
}
StandardJavaFileManager fileManager = new MaskedFileManager();
return run(javacOpts.toArray(new String[0]), fileManager, ImmutableList.copyOf(fileManager.getJavaFileObjectsFromStrings(sources)), /* processors= */
null);
}
Aggregations