Package com.sun.tools.javac.file

Examples of com.sun.tools.javac.file.JavacFileManager$Archive


    public static void main(String... args) throws Throwable {
        String self = T6358024.class.getName();

        String testSrc = System.getProperty("test.src");

        fm = new JavacFileManager(new Context(), false, null);
        JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + self + ".java");

        test(fm, f,
             new Option[] { new Option("-d", ".")},
             7);
View Full Code Here


    private static String testSrc = System.getProperty("test.src");
    private static String self = T6358168.class.getName();

    public static void main(String... args) throws Throwable {

        JavacFileManager fm = new JavacFileManager(new Context(), false, null);
        JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + T6358168.class.getName() + ".java");

        try {
            // first, test case with no annotation processing
            testNoAnnotationProcessing(fm, f);
View Full Code Here

    public static void main(String... args) throws Throwable {
        String self = T6358166.class.getName();

        String testSrc = System.getProperty("test.src");

        JavacFileManager fm = new JavacFileManager(new Context(), false, null);
        JavaFileObject f = fm.getFileForInput(testSrc + File.separatorChar + self + ".java");

        test(fm, f, "-verbose", "-d", ".");

        test(fm, f, "-verbose", "-d", ".", "-XprintRounds", "-processorpath", ".", "-processor", self);
    }
View Full Code Here

        File outDir = new File(testName);
        outDir.mkdirs();
        compile(outDir, opts);

        Context ctx = new Context();
        JavacFileManager fm = new JavacFileManager(ctx, true, null);
        fm.setLocation(StandardLocation.CLASS_PATH, Arrays.asList(outDir));
        ClassReader cr = ClassReader.instance(ctx);
        cr.saveParameterNames = true;
        Names names = Names.instance(ctx);

        Set<String> classes = getTopLevelClasses(outDir);
View Full Code Here

    void run() throws Exception {
        Context c = new Context();
        DiagnosticCollector<JavaFileObject> dc =
            new DiagnosticCollector<JavaFileObject>();
        c.put(DiagnosticListener.class, dc);
        StandardJavaFileManager fm = new JavacFileManager(c, false, null);
        fm.setLocation(StandardLocation.CLASS_PATH,
                       Arrays.asList(new File("DOES_NOT_EXIST.jar")));
        FileObject fo = fm.getFileForInput(StandardLocation.CLASS_PATH,
                                           "p", "C.java");
        System.err.println(fo + "\n" + dc.getDiagnostics());
        if (dc.getDiagnostics().size() > 0)
            throw new Exception("unexpected diagnostics found");
    }
View Full Code Here

    }

    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);

        Dependencies d = new Dependencies();
View Full Code Here

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

    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

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

        if (!useSymbolFile) {
            options.put("ignore.symbol.file", "true");
        }
        return new JavacFileManager(c, false, null);
    }
View Full Code Here

        options.put("useOptimizedZip",
                Boolean.toString(zipFileIndexKind == USE_ZIP_FILE_INDEX));

        if (symFileKind == IGNORE_SYMBOL_FILE)
            options.put("ignore.symbol.file", "true");
        JavacFileManager fm = new JavacFileManager(ctx, false, null);
        List<File> path = getPath(System.getProperty(classpathProperty));
        fm.setLocation(CLASS_PATH, path);
        return fm;
    }
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.file.JavacFileManager$Archive

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.