Package com.google.errorprone

Examples of com.google.errorprone.ErrorProneOptions


                                 JavaFileManager fileManager,
                                 DiagnosticListener<? super JavaFileObject> diagnosticListener,
                                 Iterable<String> options,
                                 Iterable<String> classes,
                                 Iterable<? extends JavaFileObject> compilationUnits) {
    ErrorProneOptions errorProneOptions = ErrorProneOptions.processArgs(ArrayUtil.toStringArray(ContainerUtil.toCollection(options)));
    List<String> remainingOptions = Arrays.asList(errorProneOptions.getRemainingArgs());
    CompilationTask task = myJavacTool.getTask(out, fileManager, diagnosticListener, remainingOptions, classes, compilationUnits);
    Context context = ((JavacTaskImpl)task).getContext();
    try {
      ErrorProneScanner scanner = new ErrorProneScanner(ErrorProneScanner.EnabledPredicate.DEFAULT_CHECKS);
      Method setDisabledChecks = ErrorProneScanner.class.getDeclaredMethod("setDisabledChecks", Set.class);
      setDisabledChecks.setAccessible(true);
      setDisabledChecks.invoke(scanner, errorProneOptions.getDisabledChecks());
      context.put(Scanner.class, scanner);
    }
    catch (InvocationTargetException e) {
      throw new RuntimeException(e.getTargetException());
    }
View Full Code Here

TOP

Related Classes of com.google.errorprone.ErrorProneOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.