Package javax.annotation.processing

Examples of javax.annotation.processing.Messager.printMessage()


                StringBuilder cycleInfo = new StringBuilder();
                for (String cycle : cycles) {
                    cycleInfo.append(cycle).append(" -> ");
                }
                cycleInfo.append(cycles.get(0));
                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
View Full Code Here


                    cycleInfo.append(cycle).append(" -> ");
                }
                cycleInfo.append(cycles.get(0));
                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
            }
        }
View Full Code Here

                messager.printMessage(ERROR,
                        "Cyclic dependencies detected for action [" + payload + "]: " + cycleInfo);
                messager.printMessage(ERROR, "Please review [" + graphVizFile + "] for more details.");
            }
            if (!cyclesFound) {
                messager.printMessage(NOTE, "No cyclic dependencies found for action [" + payload + "]");
            }
        }
    }
}
View Full Code Here

            return true;
        }

        Messager messager = processingEnv.getMessager();

        messager.printMessage(Diagnostic.Kind.NOTE, "PathAnnotationProcessor now in processing.");
        try {
            List<PathInfo> pathList = new ArrayList<PathInfo>(annotations.size());
            List<Element> elementList = new ArrayList<Element>();
            for (TypeElement type : annotations) {
                Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(type);
View Full Code Here

            FileObject file = createXmlFile(filer, messager, elementList);
            setupMountPoint(mountPoint, pathList);
            writeMountPoint(context, file, mountPoint);
        } catch (JAXBException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        } catch (IOException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        }
View Full Code Here

            writeMountPoint(context, file, mountPoint);
        } catch (JAXBException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        } catch (IOException ex) {
            messager.printMessage(Diagnostic.Kind.ERROR, "Can not create a java source file");
            LOGGER.error("Can not create a java source file", ex);
        }
        return true;
    }
View Full Code Here

            final String packageName = packageElement.getQualifiedName().toString();
            final String storeDelegate = storeElement.getSimpleName().toString();
            final boolean changeSupport = typeUtils.isAssignable(storeElement.asType(),
                    elementUtils.getTypeElement(ChangeSupport.class.getName()).asType());
            final String storeClassName = GenerationUtil.storeImplementation(storeDelegate);
            messager.printMessage(NOTE,
                    String.format("Discovered annotated store [%s]", storeElement.getQualifiedName()));

            List<ExecutableElement> processMethods = new ArrayList<>();
            if (findValidProcessMethods(messager, typeUtils, storeElement, processMethods)) {
                Collection<ProcessInfo> processInfos = getProcessInfos(messager, typeUtils, storeElement,
View Full Code Here

                metadata.add(new StoreDelegateMetadata(packageName, storeClassName, storeDelegate, changeSupport,
                        processInfos));
            } else {
                // no valid process methods!
                messager.printMessage(ERROR,
                        String.format("%s does not contain suitable methods annotated with %s.",
                                storeElement.getQualifiedName(), Process.class.getName()));
                break;
            }
        }
View Full Code Here

        final Messager messager = processingEnv.getMessager();

        // store delegates
        for (StoreDelegateMetadata md : metadata) {
            try {
                messager.printMessage(NOTE, String.format("Generating code for [%s]", md.storeClassName));
                StoreGenerator generator = new StoreGenerator();
                final StringBuffer code = generator.generate(md);
                writeCode(md.packageName, md.storeClassName, code);

                messager.printMessage(NOTE,
View Full Code Here

                messager.printMessage(NOTE, String.format("Generating code for [%s]", md.storeClassName));
                StoreGenerator generator = new StoreGenerator();
                final StringBuffer code = generator.generate(md);
                writeCode(md.packageName, md.storeClassName, code);

                messager.printMessage(NOTE,
                        String.format("Successfully generated store implementation [%s]", md.storeClassName));
            } catch (GenerationException ge) {
                final String msg = ge.getMessage();
                messager.printMessage(Diagnostic.Kind.ERROR, msg/* , storeElement*/);
            }
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.