public boolean process()

in src/main/java/com/amazonaws/eclipse/simpleworkflow/asynchrony/annotationprocessor/AsynchronyDeciderAnnotationProcessor.java [49:93]


    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
        if (!roundEnv.processingOver()) {
            processingEnv.getMessager().printMessage(Kind.NOTE, "AsynchronyDeciderAnnotationProcessor.process() invoked.");
            this.annotationsToExcludeFromCopying = new HashSet<DeclaredType>();
            this.annotationsToExcludeFromCopying.add(ProcessorUtils.getDeclaredType(processingEnv,
                    ProcessorConstants.EXECUTE_ANNOTATION));
            this.annotationsToExcludeFromCopying.add(ProcessorUtils.getDeclaredType(processingEnv,
                    ProcessorConstants.ACTIVITY_ANNOTATION));
            this.annotationsToExcludeFromCopying.add(ProcessorUtils.getDeclaredType(processingEnv,
                    ProcessorConstants.SIGNAL_ANNOTATION));
            this.annotationsToExcludeFromCopying.add(ProcessorUtils.getDeclaredType(processingEnv,
                    ProcessorConstants.GETSTATE_ANNOTATION));
            this.annotationsToExcludeFromCopying.add(ProcessorUtils.getDeclaredType(processingEnv,
                    ProcessorConstants.JAVA_LANG_OVERRIDE));

            Set<? extends Element> annotatedElements = roundEnv.getElementsAnnotatedWith(Activities.class);
            for (Element annotatedElement : annotatedElements) {
                ActivitiesValidator activitiesValidator = new ActivitiesValidator();
                activitiesValidator.scan(annotatedElement, processingEnv);

                if (!activitiesValidator.isHasErrors() && annotatedElement instanceof TypeElement) {
                    processingEnv.getMessager().printMessage(Kind.NOTE,
                            "Processing @Activities for " + annotatedElement.getSimpleName());
                    processActivities(annotatedElement);
                }
            }

            annotatedElements = roundEnv.getElementsAnnotatedWith(Workflow.class);
            for (Element annotatedElement : annotatedElements) {
                WorkflowValidator workflowValidator = new WorkflowValidator();
                workflowValidator.scan(annotatedElement, processingEnv);

                if (!workflowValidator.isHasErrors() && annotatedElement instanceof TypeElement) {
                    processingEnv.getMessager().printMessage(Kind.NOTE,
                            "Processing @Workflow for " + annotatedElement.getSimpleName());
                    processWorkflow(roundEnv, annotatedElement);
                }
            }
        }
        else {
            processingEnv.getMessager().printMessage(Kind.NOTE, "Processing finished");
        }

        return false;
    }