Examples of VolatileJavaFile


Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

        for (JavaFileObject java : sources) {
            javaCompiler.addSource(java);
        }
        if (sources.isEmpty()) {
            javaCompiler.addSource(new VolatileJavaFile("A", "public class A {}"));
        }
        List<Diagnostic<? extends JavaFileObject>> diagnostics = javaCompiler.doCompile();
        if (dump) {
            for (Diagnostic<? extends JavaFileObject> d : diagnostics) {
                System.out.println("====");
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

    private void start(Callback callback, JavaFileObject... sources) {
        for (JavaFileObject java : sources) {
            compiler.addSource(java);
        }
        if (sources.length == 0) {
            compiler.addSource(new VolatileJavaFile("A", "public class A {}"));
        }
        compiler.addProcessor(new DelegateProcessor(callback));
        List<Diagnostic<? extends JavaFileObject>> diagnostics = compiler.doCompile();
        for (Diagnostic<?> d : diagnostics) {
            if (d.getKind() == Diagnostic.Kind.ERROR) {
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

                in.close();
            } catch (IOException e) {
                throw new AssertionError(e);
            }
        }
        sources.add(new VolatileJavaFile(
                name.replace('.', '/'),
                buf.toString()));
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

        compiler.addArguments("-Xlint:unchecked");
        for (JavaFileObject java : sources) {
            compiler.addSource(java);
        }
        if (sources.isEmpty()) {
            compiler.addSource(new VolatileJavaFile("A", "public class A {}"));
        }
        List<Diagnostic<? extends JavaFileObject>> diagnostics = compiler.doCompile();
        for (JavaFileObject java : compiler.getSources()) {
            try {
                System.out.println("====" + java.getName());
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here

Examples of com.asakusafw.utils.java.jsr199.testing.VolatileJavaFile

            buf.append(packageDeclOrNull.getName().toNameString().replace('.', '/'));
            buf.append("/");
        }
        assert subPath.endsWith(".java");
        buf.append(subPath.substring(0, subPath.length() - 5));
        VolatileJavaFile file = new VolatileJavaFile(buf.toString());
        register(file);
        return new PrintWriter(file.openWriter());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.