equal
deleted
inserted
replaced
391 log = Log.instance(context); |
391 log = Log.instance(context); |
392 |
392 |
393 if (options == null) |
393 if (options == null) |
394 options = Options.instance(context); // creates a new one |
394 options = Options.instance(context); // creates a new one |
395 |
395 |
396 filenames = new LinkedHashSet<File>(); |
396 filenames = new LinkedHashSet<>(); |
397 classnames = new ListBuffer<String>(); |
397 classnames = new ListBuffer<>(); |
398 JavaCompiler comp = null; |
398 JavaCompiler comp = null; |
399 /* |
399 /* |
400 * TODO: Logic below about what is an acceptable command line |
400 * TODO: Logic below about what is an acceptable command line |
401 * should be updated to take annotation processing semantics |
401 * should be updated to take annotation processing semantics |
402 * into account. |
402 * into account. |
451 String plugins = options.get(PLUGIN); |
451 String plugins = options.get(PLUGIN); |
452 if (plugins != null) { |
452 if (plugins != null) { |
453 JavacProcessingEnvironment pEnv = JavacProcessingEnvironment.instance(context); |
453 JavacProcessingEnvironment pEnv = JavacProcessingEnvironment.instance(context); |
454 ClassLoader cl = pEnv.getProcessorClassLoader(); |
454 ClassLoader cl = pEnv.getProcessorClassLoader(); |
455 ServiceLoader<Plugin> sl = ServiceLoader.load(Plugin.class, cl); |
455 ServiceLoader<Plugin> sl = ServiceLoader.load(Plugin.class, cl); |
456 Set<List<String>> pluginsToCall = new LinkedHashSet<List<String>>(); |
456 Set<List<String>> pluginsToCall = new LinkedHashSet<>(); |
457 for (String plugin: plugins.split("\\x00")) { |
457 for (String plugin: plugins.split("\\x00")) { |
458 pluginsToCall.add(List.from(plugin.split("\\s+"))); |
458 pluginsToCall.add(List.from(plugin.split("\\s+"))); |
459 } |
459 } |
460 JavacTask task = null; |
460 JavacTask task = null; |
461 for (Plugin plugin : sl) { |
461 for (Plugin plugin : sl) { |
484 |
484 |
485 // FIXME: this code will not be invoked if using JavacTask.parse/analyze/generate |
485 // FIXME: this code will not be invoked if using JavacTask.parse/analyze/generate |
486 String xdoclint = options.get(XDOCLINT); |
486 String xdoclint = options.get(XDOCLINT); |
487 String xdoclintCustom = options.get(XDOCLINT_CUSTOM); |
487 String xdoclintCustom = options.get(XDOCLINT_CUSTOM); |
488 if (xdoclint != null || xdoclintCustom != null) { |
488 if (xdoclint != null || xdoclintCustom != null) { |
489 Set<String> doclintOpts = new LinkedHashSet<String>(); |
489 Set<String> doclintOpts = new LinkedHashSet<>(); |
490 if (xdoclint != null) |
490 if (xdoclint != null) |
491 doclintOpts.add(DocLint.XMSGS_OPTION); |
491 doclintOpts.add(DocLint.XMSGS_OPTION); |
492 if (xdoclintCustom != null) { |
492 if (xdoclintCustom != null) { |
493 for (String s: xdoclintCustom.split("\\s+")) { |
493 for (String s: xdoclintCustom.split("\\s+")) { |
494 if (s.isEmpty()) |
494 if (s.isEmpty()) |