Package com.sun.tools.javac.util

Examples of com.sun.tools.javac.util.Context


    }

    void run(PrintWriter out, String... args) throws IOException, ClassFileNotFoundException {
        decodeArgs(args);

        final StandardJavaFileManager fm = new JavacFileManager(new Context(), false, null);
        if (classpath != null)
            fm.setLocation(StandardLocation.CLASS_PATH, classpath);

        ClassFileReader reader = new ClassFileReader(fm);
View Full Code Here


        super(context, true, charset);
        setIgnoreSymbolFile(true);
    }

    public static JavapFileManager create(final DiagnosticListener<? super JavaFileObject> dl, PrintWriter log) {
        Context javac_context = new Context();

        if (dl != null)
            javac_context.put(DiagnosticListener.class, dl);
        javac_context.put(com.sun.tools.javac.util.Log.outKey, log);

        return new JavapFileManager(javac_context, null);
    }
View Full Code Here

    JavacFileManager createFileManager(boolean useOptimizedZip) {
        return createFileManager(useOptimizedZip, false);
    }

    JavacFileManager createFileManager(boolean useOptimizedZip, boolean useSymbolFile) {
        Context ctx = new Context();
        Options options = Options.instance(ctx);
        options.put("useOptimizedZip", Boolean.toString(useOptimizedZip));
        if (!useSymbolFile) {
            options.put("ignore.symbol.file", "true");
        }
View Full Code Here

        fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(classpath));
        return fm;
    }

    JavacFileManager createFileManager(boolean useOptimizedZip) {
        Context ctx = new Context();
        Options options = Options.instance(ctx);
        options.put("useOptimizedZip", Boolean.toString(useOptimizedZip));
        return new JavacFileManager(ctx, false, null);
    }
View Full Code Here

    JavacFileManager createFileManager(boolean useOptimizedZip) {
        return createFileManager(useOptimizedZip, false);
    }

    JavacFileManager createFileManager(boolean useOptimizedZip, boolean useSymbolFile) {
        Context c = new Context();
        Options options = Options.instance(c);

        options.put("useOptimizedZip", Boolean.toString(useOptimizedZip));

        if (!useSymbolFile) {
View Full Code Here

          PrintWriter errWriter,
          PrintWriter warnWriter,
          PrintWriter noticeWriter,
          String defaultDocletClassName,
          ClassLoader docletParentClassLoader) {
        Context tempContext = new Context(); // interim context until option decoding completed
        messager = new Messager(tempContext, programName, errWriter, warnWriter, noticeWriter);
        this.defaultDocletClassName = defaultDocletClassName;
        this.docletParentClassLoader = docletParentClassLoader;
    }
View Full Code Here

        this(programName, defaultDocletClassName, null);
    }

    Start(String programName, String defaultDocletClassName,
          ClassLoader docletParentClassLoader) {
        Context tempContext = new Context(); // interim context until option decoding completed
        messager = new Messager(tempContext, programName);
        this.defaultDocletClassName = defaultDocletClassName;
        this.docletParentClassLoader = docletParentClassLoader;
    }
View Full Code Here

        setDocletInvoker(argv);
        ListBuffer<String> subPackages = new ListBuffer<String>();
        ListBuffer<String> excludedPackages = new ListBuffer<String>();

        Context context = new Context();
        // Setup a new Messager, using the same initial parameters as the
        // existing Messager, except that this one will be able to use any
        // options that may be set up below.
        Messager.preRegister(context,
                messager.programName,
View Full Code Here

                sw = new StringWriter();
                pw = new PrintWriter(sw);
            } else
                pw = out;

            Context c = new Context();
            JavacFileManager.preRegister(c); // can't create it until Log has been set up
            MessageTracker.preRegister(c, keys);
            com.sun.tools.javac.main.Main m = new com.sun.tools.javac.main.Main("javac", pw);
            int rc = m.compile(args.toArray(new String[args.size()]), c);
View Full Code Here

    JavaFileManager getFileManager(String classpathProperty,
                                   boolean symFileKind,
                                   boolean zipFileIndexKind)
            throws IOException {
        Context ctx = new Context();
        Options options = Options.instance(ctx);
        options.put("useOptimizedZip",
                Boolean.toString(zipFileIndexKind == USE_ZIP_FILE_INDEX));

        if (symFileKind == IGNORE_SYMBOL_FILE)
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.util.Context

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.