Package javax.tools

Examples of javax.tools.JavaFileObject.openOutputStream()


        {


            JavaFileObject factoryFile = processingEnv.getFiler().createSourceFile(qualifiedClassName);

            PrintWriter pw = new PrintWriter(new OutputStreamWriter(factoryFile.openOutputStream(), "UTF-8"));
            pw.println("/*");
            for (String headerLine : License.LICENSE)
            {
                pw.println(" *" + headerLine);
            }
View Full Code Here


        PackageElement packageElement = (PackageElement) classElement.getEnclosingElement();

        try
        {
            JavaFileObject factoryFile = filer.createSourceFile(factoryName);
            PrintWriter pw = new PrintWriter(new OutputStreamWriter(factoryFile.openOutputStream(), "UTF-8"));
            pw.println("/*");
            for(String headerLine : License.LICENSE)
            {
                pw.println(" *" + headerLine);
            }
View Full Code Here

        {
            Map<String, Object> model = new HashMap<String, Object>();
            model.put("subsystemExtensions", declararions);

            JavaFileObject sourceFile = filer.createSourceFile(FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

        {
            Map<String, Object> model = new HashMap<String, Object>();
            model.put("extensions", discovered);

            JavaFileObject sourceFile = filer.createSourceFile(FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

        Map<String, Object> model = new HashMap<String, Object>();
        //model.put("packageName", packageName);
        //model.put("className", simpleName);
        model.put("extensions", discovered);

        OutputStream output = sourceFile.openOutputStream();
        new TemplateProcessor().process(TEMPLATE, model, output);

        output.flush();
        output.close();
View Full Code Here

        {
            Map<String, Object> model = new HashMap<String, Object>();
            model.put("extensions", discovered);

            JavaFileObject sourceFile = filer.createSourceFile(FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

    private void writeRuntimeFile() throws Exception {
        Map<String, Object> model = new HashMap<String, Object>();
        model.put("runtimeMenuItemExtensions", runtimeExtensions);

        JavaFileObject sourceFile = filer.createSourceFile(RUNTIME_FILENAME);
        OutputStream output = sourceFile.openOutputStream();
        new TemplateProcessor().process(RUNTIME_TEMPLATE, model, output);
        output.flush();
        output.close();
    }
View Full Code Here

    private void writeSubsystemFile() throws Exception{
        Map<String, Object> model = new HashMap<String, Object>();
        model.put("subsystemExtensions", subsystemDeclararions);

        JavaFileObject sourceFile = filer.createSourceFile(SUBSYSTEM_FILENAME);
        OutputStream output = sourceFile.openOutputStream();
        new TemplateProcessor().process(SUBSYSTEM_TEMPLATE, model, output);
        output.flush();
        output.close();
    }
View Full Code Here

        Map<String, Object> model = new HashMap<String, Object>();
        model.put("extensions", discoveredBeanFactories);
        model.put("categoryClasses", categoryClasses);

        JavaFileObject sourceFile = filer.createSourceFile(BEAN_FACTORY_FILENAME);
        OutputStream output = sourceFile.openOutputStream();
        new TemplateProcessor().process(BEAN_FACTORY_TEMPLATE, model, output);
        output.flush();
        output.close();
    }
View Full Code Here

    private void writeBindingFile() throws Exception {
        JavaFileObject sourceFile = filer.createSourceFile(BINDING_FILENAME);
        Map<String, Object> model = new HashMap<String, Object>();
        model.put("extensions", discoveredBindings);

        OutputStream output = sourceFile.openOutputStream();
        new TemplateProcessor().process(BINDING_TEMPLATE, model, output);

        output.flush();
        output.close();
    }
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.