Package javax.tools

Examples of javax.tools.FileObject.openOutputStream()


              String subClassCode = generateSubclassCode(
                  modelClass, outputConfig);
              fo = processingEnv.getFiler().createResource(
                  StandardLocation.SOURCE_OUTPUT,
                  packageName, fileName + ".js");
              os = fo.openOutputStream();
              os.write(subClassCode
                  .getBytes(ModelGenerator.UTF8_CHARSET));
              os.close();
            }
View Full Code Here


          }
          else {
            FileObject fo = processingEnv.getFiler()
                .createResource(StandardLocation.SOURCE_OUTPUT,
                    packageName, fileName + ".js");
            OutputStream os = fo.openOutputStream();
            os.write(code.getBytes(ModelGenerator.UTF8_CHARSET));
            os.close();
          }

        }
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_DEV_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_DEV_TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_PRODUCT_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_PRODUCT_TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
View Full Code Here

            Map<String, Object> model = new HashMap<String, Object>();
            model.put("devHost", devHostUrl);

            FileObject sourceFile = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "gwt-proxy.properties");
            OutputStream output1 = sourceFile.openOutputStream();

            FileObject sourceFile2 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "upload-proxy.properties");
            OutputStream output2 = sourceFile2.openOutputStream();
View Full Code Here

                    StandardLocation.SOURCE_OUTPUT, "", "gwt-proxy.properties");
            OutputStream output1 = sourceFile.openOutputStream();

            FileObject sourceFile2 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "upload-proxy.properties");
            OutputStream output2 = sourceFile2.openOutputStream();

            FileObject sourceFile3 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "logout.properties");
            OutputStream output3 = sourceFile3.openOutputStream();
View Full Code Here

                    StandardLocation.SOURCE_OUTPUT, "", "upload-proxy.properties");
            OutputStream output2 = sourceFile2.openOutputStream();

            FileObject sourceFile3 = filer.createResource(
                    StandardLocation.SOURCE_OUTPUT, "", "logout.properties");
            OutputStream output3 = sourceFile3.openOutputStream();

            new TemplateProcessor().process("gwt.proxy.tmpl", model, output1);
            new TemplateProcessor().process("gwt.proxy.upload.tmpl", model, output2);
            new TemplateProcessor().process("gwt.proxy.logout.tmpl", model, output3);
View Full Code Here

            String relativeName = "META-INF/services/" + serviceName;
            loadExistingServicesFile(filer, serviceName);
            try
            {
                FileObject serviceFile = filer.createResource(StandardLocation.CLASS_OUTPUT, "", relativeName);
                PrintWriter pw = new PrintWriter(new OutputStreamWriter(serviceFile.openOutputStream(), "UTF-8"));

                for (String headerLine : License.LICENSE)
                {
                    pw.println("#" + headerLine);
                }
View Full Code Here

            model.put("modules", modules);
            model.put("properties", gwtConfigProps);

            FileObject sourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, MODULE_PACKAGENAME,
                    MODULE_FILENAME);
            OutputStream output = sourceFile.openOutputStream();
            new TemplateProcessor().process(MODULE_TEMPLATE, model, output);
            output.flush();
            output.close();
        }
        catch (IOException e)
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.