Package javax.tools

Examples of javax.tools.FileObject.openOutputStream()


                    StandardLocation.SOURCE_OUTPUT, "", "patch-proxy.properties");
            OutputStream output3 = sourceFile3.openOutputStream();

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

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


      StringBuffer body = generateBody( entity, context );

      FileObject fo = context.getProcessingEnvironment().getFiler().createSourceFile(
          getFullyQualifiedClassName( entity, metaModelPackage )
      );
      OutputStream os = fo.openOutputStream();
      PrintWriter pw = new PrintWriter( os );

      if ( !metaModelPackage.isEmpty() ) {
        pw.println( "package " + metaModelPackage + ";" );
        pw.println();
View Full Code Here

        allServices.addAll(newServices);
        log("New service file contents: " + allServices);
        FileObject fileObject = filer.createResource(StandardLocation.CLASS_OUTPUT, "",
            resourceFile);
        OutputStream out = fileObject.openOutputStream();
        ServicesFile.writeServiceFile(allServices, out);
        out.close();
        log("Wrote to: " + fileObject.toUri());
      } catch (IOException e) {
        fatalError("Unable to create " + resourceFile + ", " + e);
View Full Code Here

      return configOutputStream;
    }
    Filer filer = processingEnv.getFiler();
    FileObject fileObject =
        filer.createResource(StandardLocation.CLASS_OUTPUT, "", CALLBACKS_CONFIG_FILE);
    return fileObject.openOutputStream();
  }

  private void generateConfigFiles() {
    try {
      OutputStream outputStream = null;
View Full Code Here

    }

    private void writeCacheFile(final Element... elements) throws IOException {
        final FileObject fo = processingEnv.getFiler().createResource(StandardLocation.CLASS_OUTPUT,
            Strings.EMPTY, PLUGIN_CACHE_FILE, elements);
        final OutputStream out = fo.openOutputStream();
        try {
            pluginCache.writeCache(out);
        } finally {
            out.close();
        }
View Full Code Here

  public void init(ProcessingEnvironment processingEnv) {
    super.init(processingEnv);
    try {
      FileObject manifest = processingEnv.getFiler()
          .createResource(StandardLocation.SOURCE_OUTPUT, "", "bugPatterns.txt");
      pw = new PrintWriter(new OutputStreamWriter(manifest.openOutputStream()));
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

            code = code.replaceFirst("(Ext.define\\([\"'].+?)([\"'],)",
                "$1Base$2");
            FileObject fo = processingEnv.getFiler().createResource(
                StandardLocation.SOURCE_OUTPUT, packageName,
                fileName + "Base.js");
            OutputStream os = fo.openOutputStream();
            os.write(code.getBytes(ModelGenerator.UTF8_CHARSET));
            os.close();

            try {
              fo = processingEnv.getFiler().getResource(
View Full Code Here

              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

            code = code.replaceFirst(
                "(Ext.define\\([\"'].+?)([\"'],)", "$1Base$2");
            FileObject fo = processingEnv.getFiler()
                .createResource(StandardLocation.SOURCE_OUTPUT,
                    packageName, fileName + "Base.js");
            OutputStream os = fo.openOutputStream();
            os.write(code.getBytes(ModelGenerator.UTF8_CHARSET));
            os.close();

            try {
              fo = processingEnv.getFiler().getResource(
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.