Package javax.annotation.processing

Examples of javax.annotation.processing.Filer.createResource()


            FileObject resource;
            try {
                resource = filer.getResource(StandardLocation.CLASS_OUTPUT, packageName, fileName);
            } catch (Throwable e) {
                //resource = filer.createResource(StandardLocation.CLASS_OUTPUT, "org.apache.camel", "CamelAPT2.txt", rootElements.toArray(new Element[rootElements.size()]));
                resource = filer.createResource(StandardLocation.CLASS_OUTPUT, packageName, fileName, new Element[0]);
            }
            URI uri = resource.toUri();
            File file = null;
            if (uri != null) {
                try {
View Full Code Here


                }
            }

            if (!classes.isEmpty()) {
                final Filer filer = processingEnv.getFiler();
                FileObject fo = filer.createResource(StandardLocation.CLASS_OUTPUT, "", "META-INF/restmodelextensions");
                bw = new BufferedWriter(fo.openWriter());
                // parent model:model extension
                for (Map.Entry<String, List<String>> entry : classes.entrySet()) {
                    final String key = entry.getKey();
                    for (String ext : entry.getValue()) {
View Full Code Here

        try {
            IndentingWriter p;
            FileObject jfo;
            if (filer != null) {
                jfo = filer.createResource(StandardLocation.SOURCE_OUTPUT,
                        Names.getPackageName(name), getHandlerConfigFileName(name));
                options.addGeneratedFile(new File(jfo.toUri()));
                p = new IndentingWriter(new OutputStreamWriter(jfo.openOutputStream()));
            } else { // leave for backw. compatibility now
                String hcName = getHandlerConfigFileName(name);
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.