Package com.sun.tools.javac.main

Examples of com.sun.tools.javac.main.Main


            if (fileManager == null)
                fileManager = getStandardFileManager(diagnosticListener, null, null);
            fileManager = ccw.wrap(fileManager);
            context.put(JavaFileManager.class, fileManager);
            processOptions(context, fileManager, options);
            Main compiler = new Main("javacTask", context.get(Log.outKey));
            return new JavacTaskImpl(compiler, options, context, classes, compilationUnits);
        } catch (ClientCodeException ex) {
            throw new RuntimeException(ex.getCause());
        }
    }
View Full Code Here


  private ErrorProneCompiler(String s, PrintWriter printWriter,
      DiagnosticListener<? super JavaFileObject> diagnosticListener,
      Scanner errorProneScanner,
      Class<? extends JavaCompiler> compilerClass) {
    this.printWriter = printWriter;
    this.main = new Main(s, printWriter);
    this.diagnosticListener = diagnosticListener;
    this.errorProneScanner = errorProneScanner;
    this.compilerClass = compilerClass;
  }
View Full Code Here

            fileManager = ccw.wrap(fileManager);

            context.put(JavaFileManager.class, fileManager);

            processOptions(context, fileManager, options);
            Main compiler = new Main("javacTask", context.get(Log.outKey));
            return new JavacTaskImpl(compiler, options, context, classes, compilationUnits);
        } catch (ClientCodeException ex) {
            throw new RuntimeException(ex.getCause());
        }
    }
View Full Code Here

        if (fileManager == null)
            fileManager = getStandardFileManager(diagnosticListener, null, null);
        context.put(JavaFileManager.class, fileManager);
        processOptions(context, fileManager, options);
        Main compiler = new Main("javacTask", context.get(Log.outKey));
        return new JavacTaskImpl(this, compiler, options, context, classes, compilationUnits);
    }
View Full Code Here

        if (fileManager == null)
            fileManager = getStandardFileManager(diagnosticListener, null, null);
        context.put(JavaFileManager.class, fileManager);
        processOptions(context, fileManager, options);
        Main compiler = new Main("javacTask", context.get(Log.outKey));
        return new JavacTaskImpl(this, compiler, options, context, classes, compilationUnits);
    }
View Full Code Here

            if (fileManager == null)
                fileManager = getStandardFileManager(diagnosticListener, null, null);
            fileManager = ccw.wrap(fileManager);
            context.put(JavaFileManager.class, fileManager);
            processOptions(context, fileManager, options);
            Main compiler = new Main("javacTask", context.get(Log.outKey));
            return new JavacTaskImpl(compiler, options, context, classes, compilationUnits);
        } catch (ClientCodeException ex) {
            throw new RuntimeException(ex.getCause());
        }
    }
View Full Code Here

    }

    void compile(Context context, String... args) throws Exception {
        StringWriter sw = new StringWriter();
        PrintWriter pw = new PrintWriter(sw);
        Main m = new Main("javac", pw);
        int rc = m.compile(args, context);
        pw.close();
        String out = sw.toString();
        if (!out.isEmpty())
            System.err.println(out);
        if (rc != 0)
View Full Code Here

            args.addAll(opts);
            for (File f: files)
                args.add(f.getPath());

            Main main = new Main("javac", out);
            Context c = new Context() {
                @Override public void clear() {
                    ((JavacFileManager) get(JavaFileManager.class)).close();
                    super.clear();
                }
            };
            JavacFileManager.preRegister(c); // can't create it until Log has been set up
            ArgTypeJavaCompiler.preRegister(c);
            ArgTypeMessages.preRegister(c);
            int result = main.compile(args.toArray(new String[args.size()]), c);

            return (result == 0);
        }
View Full Code Here

        if (fileManager == null)
            fileManager = getStandardFileManager(diagnosticListener, null, null);
        context.put(JavaFileManager.class, fileManager);
        processOptions(context, fileManager, options);
        Main compiler = new Main("javacTask", context.get(Log.outKey));
        return new JavacTaskImpl(this, compiler, options, context, classes, compilationUnits);
    }
View Full Code Here

        if (fileManager == null)
            fileManager = getStandardFileManager(diagnosticListener, null, null);
        context.put(JavaFileManager.class, fileManager);
        processOptions(context, fileManager, options);
        Main compiler = new Main("javacTask", context.get(Log.outKey));
        return new JavacTaskImpl(this, compiler, options, context, classes, compilationUnits);
       
        }finally{//ζˆ‘εŠ δΈŠηš„
  DEBUG.P(0,this,"getTask(6)");
  }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.main.Main

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.